Moving Your WordPress Blog

Have you been putting off moving your WordPress blog to a better host because you find the idea of migrating servers so daunting? If so, you are not alone; this is a common concern. Fortunately, as long as you can follow directions, moving your WordPress blog to a new host can be as simple as running through a set of steps.

This post will show you, step by step, how to move your WordPress blog without having to buy any expensive plugins. These instructions assume that you simply want to switch hosts and not change your domain name or the URL of your blog in any way.

One last note before we begin: if the thought of moving your WordPress blog makes you nervous, consider asking your host if they offer migration services. Many hosts offer this for free or for a nominal fee (especially managed WordPress hosting solutions), and it can be worth the peace of mind knowing that your site is in the hands of someone who has done this before. If migration services aren’t an option, though, don’t fear – just keep reading.

1. Install and activate the Duplicator plugin

Duplicator is a free WordPress plugin that really simplifies the process of moving your WordPress blog to a new location. This plugin will quickly and easily pack up your site on your old host and unpack it on your new one. While you can go through the steps of manually migrating your site without any plugins at all, Duplicator streamlines the process immensely.

Install Duplicator on your old host by navigating to Plugins / Add New and typing “duplicator” into the search. It should be one of the first results. Click “Install Now,” and activate the plugin once installed.

move-wp-new-host-duplicator-plugin-install

2. Create a packaged version of your site’s files and database

Now that you’ve activated Duplicator, you can use it to create a packaged version of your WordPress site and start the process of moving your WordPres blog to a new web host. Navigate to Duplicator / Packages and click the “Create New” button in the top right:

move-wp-new-host-duplicator-new-package

On the next screen, Duplicator will ensure that your site is ready to pack. If your site does not pass the requirements, follow the advice on the plugin’s FAQ page. There are optional settings that you can work with, but they are not necessary to continue. Click “Next” to continue creating the package:

move-wp-new-host-duplicator-new-package2

On the next screen, Duplicator will run a scan of your site, which should only take a few seconds. At this point, the plugin will warn you if it finds any enormous files that you might not want to carry over with you when moving your WordPress blog to a new host. If it does find any errors, follow the suggestions to fix them, and then run the scan again.

If everything looks good, click “Build” to create the installer package:

move-wp-new-host-duplicator-new-package3

It may take several minutes for Duplicator to build the package. When the build completes, the plugin will present you with two buttons, one to download the installer and the other to download the archive. Click each of them to download them both. These are your WordPress files and database, which you will need when moving your WordPress blog to your new host.

move-wp-new-host-duplicator-new-package4

3. Create a new MySQL database and user on your new host

Duplicator does not require us to install WordPress on the new host, but the one semi-technical thing we will need to do is create a new MySQL database and user. This will give us a place to put the database we exported from Duplicator in the previous step.

The majority of popular web hosts use cPanel, which makes it easy to create new databases. I am moving my WordPress site to Bluehost, so I can show you what these steps look like on there, or you can get additional information from this help video:

If you are using another host, I recommend searching their own documentation for instructions on how to create a new database, in case they are different.

First, create a new database by entering a unique name and clicking “Create Database”:

move-wp-new-host-mysql-db1

Next, add a new user (you can use the same name as your database) and create a strong password. I used the password generator. Be sure to record this password somewhere secure. Click “Create A User”:

move-wp-new-host-mysql-db2

Next, you need to add the user you just created to your database. In the “Add a User to a Database” section of the page, choose the two that you just created, and click “Add”:

move-wp-new-host-mysql-db3

Assign all privileges and click “Make Changes”:

move-wp-new-host-mysql-db4

That’s it! You’ve created your database and new user to use for your WordPress migration.

4. Upload the installer and archive files to your new host

Next, you need to upload the two files you downloaded from Duplicator to the root location of your new WordPress site. There should be a .zip file (the archive) and a .php file (the installer).

This needs to be a completely empty folder, which you will later point your domain name at. Here are the files I’ve uploaded into mine:

move-wp-new-host-uploaded-files

5. Run the Duplicator installer

Next, you will want to navigate to the installer.php file and run the installer. It can be a little tricky to figure out what web address to visit if you are keeping the same domain name and don’t want any downtime. However, there is a trick you can use to simulate switching your DNS on your local computer. WP Engine has a great tutorial for how to do this on Mac or PC here.

When you make it to the installer, enter your database name, user, and password. The majority of the time, the host will just be localhost.

move-wp-new-host-installer

Before you proceed, please be 100% sure that you are using the new database and user that you just created in step three and that you have uploaded the two Duplicator files into their own subdirectory! Then, click “Test Connection” to test your connection.

Hopefully, the test will succeed, which looks like this:

move-wp-new-host-installer-success

Assuming everything is working as planned, check off the box indicating that you have read the warnings and click “Run Deployment.”

On the next screen, you will see the paths to the files and database. You should recognize your old domain name and the path to those files on your old host. Under those, you will see similar fields for your new host. You may need to change the URL under “New Settings” and “Advanced Options” to match your URL if it picks up the temporary IP. Once everything is set, click “Run Update”:

move-wp-new-host-installer2

If everything has gone according to plan, the next screen should have zero errors and give you a few suggestions for things to test on the new host:

move-wp-new-host-installer3

Congratulations – the hard stuff is over!

6. Check your files

At this point, it is a good idea to compare the files on the old host to those on the new host. Assuming everything has migrated correctly, the new host should match the old, with the addition of a few extra files related to the migration.

7. Change your nameservers

If everything checks out, it’s time to change your nameservers to point to the new host. This process is different on every domain registrar and host, so you may need to seek out their documentation if you are having trouble.

On your new host, follow the steps to assign the domain to your account. You will be asked to verify ownership of the domain, and the host will provide at least two nameservers for you to point the domain to. Log into your domain registrar, select your domain name, and edit the nameservers. Make sure you completely clear out the old ones.

Once you update the nameservers, it may take as long as 48 hours for the change to take effect. Until you are sure this has occurred, you should not make any major changes to your website, as you may unintentionally be editing the site hosted on the old host without realizing it.

8. Test your migrated site and delete installer files

If you are not sure if the nameservers have taken effect, there is a simple way to test. Upload a file to your media library, then use the file manager on your new host to try and find the file you just uploaded. If you do not see it in your uploads folder, you are probably still being sent to the old host.

Once you are sure that you are editing the WordPress install on the new host, navigate to Settings / Permalinks and click “Save.” This will refresh your permalink settings, which are often interrupted during a migration.

After moving your WordPress blog, it’s important that you thoroughly test your website by visiting every page or as many pages as possible to look for redirection errors and other problems.

Once you are sure everything is working as it should, click the link in the final step of the installer to perform the “Security Cleanup,” which will delete the installer files. This is very important, as these files pose a potential security risk.

Finally, having successfully completed the migration, you can now cancel the old host.

Final thoughts on moving your WordPress blog

That’s it! Though there are a lot of steps involved, the Duplicator plugin makes the process simple enough to help you with moving your WordPress blog to a new host. If you do run into trouble along the way, or the process looks too complicated, be sure to contact your new web host for assistance.

Have you been successful at moving your WordPress blog before? Did you use a plugin, or migrate manually? Share your experiences in the comments below.

0 Comments
Inline Feedbacks
View all comments

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!