An easier way to move a WordPress Site

Recently you may have noticed a few outages on my sites, and some slow loading times, so it became time to move TFD ( And the other sites I host)  to a new hosting company. Since I run on WordPress, it is not as simple as copying a few files. While I could move files, and copy the database, there is a much easier way.

This easy way is to use Duplicator from Snapcreek (https://snapcreek.com/duplicator/)

There are two versions, the regular Duplicator and the Pro version. The free version works great for most sites, as long as you have less that 500MB of data. The Pro version handles larger sites, but also enables features like automatic backups, and multiple site management.

To add the free version, you need to install the plugin.

Goto Plugins, and then click on “Add New”

image

Next, in the search box, type in duplicator, and then select Install Now for Duplicator.

image

The installer should run in a few seconds, before you can select Activate

image

Once Activated, you will be taken to the list of plugins. Find Duplicator and select “manage”

image

Next, select “Create New”

image

From here you will start the process to create a bundle, that will install your site at the new location.

First put in a name, optionally you can select storage and archive options., but for a basic move leave the defaults.

image

Then click next to have the tool scan your installation;

image

Next you will see the summary of the scan. Larger sites may flag under the size checks.

image

In this case, TFD is a large site with lots of screen shots, so it warned about that. I am using the Pro version, which allows for sites over 500MB. Click Build to start building the site file.

image

The build can take a bit of time, be patient. Large sites can take over 15 minutes.

One the build is completed, you can download the files.

image

Next copy both files to the root directory of the location where you want to install the site. Then point your browser there, and run the installer.php.

Sonce you are moving site, an easy way to test the new site, is to reconfigure your PC to use the new IP address, instead of the existing IP. This is done on Windows machines, the same way you would on a Linux server, by editing the host file! The file is in  C:\Windows\System32\drivers\etc\hosts and you can edit it with the notepad app.

It uses the same format as a normal hosts file, IP  HOSTNAME

image

In my example, I have both the old and new IP in the file, with one commented out, this way I can easily switch between sites without having to change the DNS for everyone else. the 20.235.202.158 is the new IP.

After saving the file, I can now navigate my browser to the site, where I see both the large datafile and also the installer.php file.

image

To run the restore, simply run the installer.php. After a few seconds, you should see the installer page;

image

Click next to extract the site.

image

This will extract the files,which for larger sites can take 15-20 minutes. Smaller sites extract within seconds. After the files extract you will be prompted for the database info. The tool will overwrite the database with the info from the backup. If you do not have a database, this is a great time to create the database, and a database user for your site. Make sure the user has admin privileges’ on the database so it can create tables etc.

image

Once you put in the database, click “Test Database” to verify access, and once that passes click on Next.

image

You can now verify the info. Once done, click Next.

image

Click on the Admin Login, to verify that you can log into the site. Also, on the first login, the system will automatically cleanup the install files.

image

Next, log into the moved site, and test things. You may need to rework your SSL, though if you have hosting from a provider like InMotion, the SSL is included in the hosting plan!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.