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.
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”
Next, in the search box, type in duplicator, and then select Install Now for Duplicator.
The installer should run in a few seconds, before you can select Activate
Once Activated, you will be taken to the list of plugins. Find Duplicator and select “manage”
Next, select “Create New”
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.
Then click next to have the tool scan your installation;
Next you will see the summary of the scan. Larger sites may flag under the size checks.
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.
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.
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
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 184.108.40.206 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.
To run the restore, simply run the installer.php. After a few seconds, you should see the installer page;
Click next to extract the site.
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.
Once you put in the database, click “Test Database” to verify access, and once that passes click on Next.
You can now verify the info. Once done, click Next.
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.
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!