As web developers, we can often get stubborn about the right way of doing things (of course the right way is always our way). Site migration can be one of those. The manual way is often the prefered method as you have full control and you know that everything is backed up. Today it is my mission to get you to change your ways.
For site migration of WordPress sites, I use a plugin! Before you all look down on me, let me explain why. I have moved plenty of sites around the manual way. Sometimes this was for clients moving there site to our hosting and sometimes it was going from a staging site to a live site (or vice versa). I’ve done the search and replace of the sites URL in the site’s database countless times. Its easy enough to do all this but for some reason, I always feel a little nervous about it. So, I decided to try out Duplicator and I would never go back.
As soon as duplicator is installed and activated on the site you want to migrate, you head over to the admin section and click the create package button. From there you are given options to filter out any files you don’t want to move over (think subdomains and addon domains), you are given the option to enter in the name of the new database and host so that you don’t need to fill it in later. It then does a check to see if everything looks good. This is where there may be a downfall for some of you (this can be fixed by purchasing the pro version), if your site is over 250mb then you will be warned that the package may not be able to be created. It will check the database. If all looks good it will create a zip file containing your whole site + your database and a hand installer file to download.
The next step is to move the file you just downloaded into their new destination. Once you have moved or uploaded the files to where you want to have your site, you simply need to go to the site in your browser with installer.php tacked on to the end.
http://your-site.com/installer.php
http://localhost/your-site/installer.php
You are then taken through the steps to install your site. This takes a matter of seconds to complete. You will be stunned when your site is up and running exactly the way you intended (no search-replace required). You will be prompted to delete the installations files which are taken care of with the click of a button.
A few things to note.

  • It may be worth resetting the permalinks once you have the site up. This ensures every page is going where it needs to.
  • When at the database section of installation, if you use the option create new database, pressing test will return an error saying the database was unable to be reached. This is because it doesn’t yet exist. Ignore this.

So, next time you migrate a WordPress website, give duplicator a go. It will seriously speed up your workflow and take any anxiety the goes with moving websites and databases away.