≡ Menu

Moving WordPress Blog To New Host: The Only Guide You Will Ever Need

moving wordpress blog

Couple of months ago, I transferred some of my wordpress blogs to a new hosting. Now if you are wondering why I decided to move – currently, I have quite a sum of domains hosted in 4 different servers. My main purpose was to separate my niche sites and forums from my main blogs, Mastermind Blogger and my personal blog. There is no problem whatsoever in hosting several sites in one host but I prefer to keep them separate as it helps in managing them better.

Transferring wordpress blog to another hosting service is a topic I come across pretty often and I personally experienced both good and bad so, today, I finally decided to write a tutorial in depth which will help anyone, even a newbie to move a wordpress blog from one host to another in less than 30 minutes with zero downtime. Make sure you read and understand it before you implement it because screwing up your database may cost you a fortune. I definitely do not want that so make sure you understand and ask questions if you have any at the end of the post.

So without further ado, I present to you…

Moving WordPress Blog in 5 Easy Steps


1. Backup WordPress Files and Database

Using the import/export option


There are 2 ways to backup your wordpress database. One way is using phpmyadmin and the other is the export option in the wordpress dashboard. We will move wordpress using import/export option which is pretty slick. So now, we need to export all data/content from the old host. Follow the methods below.

If you do the above, you should have the xml file. Save it and keep it in a location that you will remember.

Now open up your favorite ftp client and go to the root. Copy and make backup of the entire wp-content folder. Make sure you know the location of the drive where you save the folder so you could easily access it later.

2. Setup DNS Server Records

At first, when i was a newbie :), I did this differently and unfortunately faced several consequences such as blog didn’t function and experienced a server downtime. Here, I am going to explain how we can setup the DNS records while ensuring that our blog is functioning the way it should. If you do this, you are least likely to experience a downtime.

Usually most people replace the old name servers with the new one but, we will do this a little differently.

First, login to your domain registrar. I am going to use godaddy as an example but if you use different domain registrar then refer to the guides and videos created by hostgator.

Go to the domain you wish to change the dns record and instead of replacing the old values with the new ones, add 2 more just like shown in the image.

As you can see, wpwebhost is the old name server and hostgator is the new one. This will allow us to run our blog on two different hosts simultaneously. If you ask why do it this way – Just to be on the safe side. A good example would be – Let’s say you change the name servers and later find out that your blog is not functioning properly on the new host; you have to switch back and forth and keep updating name servers until you get your blog right on track. This is hectic and the only way to avoid this is by following the method.

If you are a pro and are confident in your skills then you can simply replace the name servers instead of doing the extras.

Once you have added the name servers, you need to login to your host’s cpanel and add the domain there. I hope you don’t need a tutorial for that. However, I have added some pictures from the cpanel to help you out, thanks to hostgator 😉

3. Install WordPress on the New Host

After completing the following tasks :

  • backing up files and databases,
  • adding (not changing) nameservers,
  • adding domain,

you need to install wordpress on the new host. Most hosting services have cpanels which can install wordpress with a click. Once you have installed the wordpress on the new web host, go to “Tools” and click “Import”. Now we will import all the content which we have exported earlier from the old host.

4. Importing the old files to the new blog

We are pretty much done. Now we need to verify that the blog on the new host is functioning properly. To do that, follow the procedures below. I didn’t want to write a tutorial on it as I found a relevant post written by someone 🙂 which explains well.

Verify Your Blog Functionality on New Host (Optional)


5. Replace Old Nameservers with New One

Once you see your blog running properly, its time that you replace the old name servers with the new one. This time we will replace it and not add. So now you should have only 2 name servers instead of 4.

Edit your host files and remove static domain name resolution by commenting out the command. You can do this by adding a # sign just before the line or you can simply remove the entry.

Use command prompt to make sure that your dynamic domain name resolution point to your new host. It is not necessary but it will tell you if your blog is running properly on the new host. If you have followed all the way then you shouldn’t have any problems moving wordpress blog.

DNS servers can take time to propagate. It can take up to 48-72 hours in some cases but most of the time its fast and done in less than an hour.

Alternate ways to backup database

Backing up and moving wordpress using phpmyadmin


As i mentioned earlier that I am going to use the import/export option to move wordpress to new host. A lot of my readers were confused so I thought of clearing this up. You can either use the import/export OR phpmyadmin to move wordpress. I explained the import option above. If you want to do the other way that is, using phpmyadmin then check out the links below. These are some excellent guides I have found. I plan on writing my own version and will do that quite soon. But for now, I prefer the import/export option 🙂

Bottom Line

If your blog is running the way it should, you can delete the old account from your old host and continue posting on the new one. 🙂 The purpose of this post was to help everyone with moving wordpress blog to new host. I hope you guys find it useful. Please let me know if I have missed anything and what works best for you.

Do you want to make backup, restoration and migration to new host fully automatic? You must read my review on backup buddy. Moving wordpress blog using this plugin is easy breezy 🙂

105 comments… add one

Leave a Comment