Howto Move WordPress To New Host
In this post i want to share a details on how to move WordPress to new host, Hostgator in this specific case, with 0 down time. Information provided is based on my recent personal experience of relocating my WordPress blog from Site5 hosting account to Hostgator and ensuring that I had no outage period and yet was able to verify that entire process worked without a glitch.
There are several steps to this process and each requires verification to ensure that everything will function properly but once you get them all right – you will ensure that your visitors will not be impacted during your move and if you rely on your blog as income source, I think it is very important. Not only does it allow your to reduce any nuisance but also avoid unprofessional appearance during your move of WordPress blog to new host.
Since I’ll be covering this process based on my personal experience I want to describe the conditions under which relocate of my blog was completed, so you can quickly evaluate if this will apply to your specific situation or not. If it doesn’t I provide several links within the article that describe slightly different procedures to move WordPress blog to new host:
- All my domains registered and maintained at NoMessDNS.com
- Old WordPress blog was hosted on Site5 as one of the primary domains
- New location for my WordPress Web 2.0 Guide blog is on Hostgator as an Addon Domain
Entire process will be split into several parts to make it least painful and most rewarding…
Step 1: Create a Complete Backup of Your WordPress Blog
This step is what will ensure that we have all the files we need to migrate our blog to new host.
1. Create backup of your files.
Using your favorite FTP client connect to your old host and download ALL files contained within your blog directory. Make sure you don’t miss hidden files such as .htaccess. If you have any plugins that required from you setting specific permissions to files or folders be sure to go through the structure of your blog and record those special permissions. Generally it would encompass applying a less restrictive permissions on files or folders within
- wp-content/themes
- wp-content/plugins
I recommend you simply document the permissions you currently have or what is even better open an installation documents for plugins that required those permissions. It is common for hosts to have inconsistencies as to what permissions will be enough to have that specific plugin running and your new host might not require changing permissions to 777 or whatever specified. Having correct installation files will help you later to troubleshoot any issues with plugins.
I personally use Filezilla free ftp client that provides all the options I need and gives me ability to traverse directories and change/record permissions as needed.
2. Create a Backup of Your Database
I have no intentions to complicate this process and simplest possible way to get a complete database file you need is simply using a Backup option provided by your host. In my case I simply download the *.sql.tgz file with complete blog database backup using backup option and then open and verify that data within the file is not corrupted. The database backup file can be viewed with any text editor and I use a Notepad provided with Windows.
Couple things you have to be aware of if your blog is old or has a lot of data in database as well as media files. You might not be able to use standard methods for backing up I describe here. Due to large files sizes your browser window will time out before you manage to get good backup files. Specifically if your database is large. If this applies to your blog I recommend you read this great article that describes how to use SSH to perform the move of WordPress to new host and does require some Unix/Linux shell knowledge (at least basic) :
Step 2: Setup Your DNS Server Records To Point to BOTH Hosts
This step is a temporary solution to ensure that we can install our blog on new host (Hostgator) and verify that it functions properly and ensures that your visitors will not see any interruption of service. If you are not sure how to do it – Hostgator has a number of video tutorials showing how to use multiple DNS registrars to setup their DNS servers. Please review what is appropriate to you or at least to get an idea of what we will be doing.
One thing we will do different is number of servers we will setup!
And don’t worry – it will not break your existing blog but required to have 2 copies of our blog running simultaneously on different hosts until we are ready to pull the plug on old host. By default Primary DNS (which points to your old host still) server will be queried by any client and once name resolution received no further queries will be done but the Hostgator host will see that their servers are also present and will allow you to create Addon Domain on your account.
Login to your registrar and ADD (not replace) 2 new DNS servers to your blog domain. Your host should have emailed you with this info during main account setup. Hostgator uses these servers: ns1.hostgator.com and ns2.hostgator.com. So all I had to do is add those 2 servers to my howtospoter.com DNS servers list in NameSecure account management.
Step 3: Create New Addon Domain And Upload Our Blog
Since we still have our blog running on old host and we added Hostgator DNS servers to domain name registrar we should be ready to go with this step without impacting visitors. It might take a few hours for the DNS change to take effect, in my case it took about 1 hour. If hostgator doesn’t see its servers listed for resolution of domain name – it will simply give you error when you try to add new Addon Domain. So, simply give it some more time and try again.
1. Add a new domain to Hostgator
To add your new blog domain to Hostgator simply proceed to cPanel and then click on Addon Domains option. You will be presented with a screen as shown below. Fill in your information and click Add Domain. Few things of note:
Username field will be a directory within public_html where you place your new blog and also a User with access to that domain via cPanel or FTP, when needed. Password is used for that user authentication, so make it strong and not as I have shown below:

If your DNS servers information propagated and Hostgator sees its servers in the list – you will get a success message otherwise simply wait and try again in an hour.
2. Upload your blog files to newly created domain
- Once your new domain created on Hostgator simply upload your blog files to the directory created in previous part. As shown in picture it would be /public_html/yourblogdomain/ . This becomes root folder of our new blog.
- Create a new database and user with access to it using MySQL Databases Tool in your cPanel. Record database, username and password information from this step. Open phpMyAdmin tool and click on new database you just created. Use Import tab and navigate to your database backup file and import the data into your new database. Now your database should have all the tables and information in it for your blog.
- Navigate to /public_html/yourblogdomain/ and open wp-config.php file for editing. Change the information to point to your newly created database. Save file and exit.
Now that your blog is restored to new host you need to verify that it actually works properly…
3. Verify Your Blog Functionality on New Host
First thing you need to do is to look in your cPanel and find out exact IP of the server where your blog is located. See image below (I have removed some info for privacy). As you see below, my IP is 74.53.28.***. For the sake of this exercise I will make it 74.53.28.123.

Now that we have our host IP address we need to force our Windows computer to direct ALL queries for yourblogdomain.com to go to 74.53.28.123.
Navigate to location (1) and open hosts (2) file for editing with Notepad. On New line enter IP address, then hit space bar and then your blog domain name (3). Use Cotrol+S to save file (Do Not SAVE it with any extensions) See image below:

Once your file is saved use a Command line utility and ping yourblogdomain.com:
c:>ping yourblogdomain.com
You should get:
C:\Documents and Settings\You>ping yourblogdomain.com
Pinging yourblogdomain.com [74.53.28.242] with 32 bytes of data:Reply from 74.53.28.123: bytes=32 time=47ms TTL=53
Reply from 74.53.28.123: bytes=32 time=46ms TTL=53
This is obviously a fake domain and you will have to substitute it with yours but what is most important is this: Pinging yourblogdomain.com [74.53.28.242] should correspond to changes we made in hosts file!
Once this works – login to your blog admin interface (now on Hostgator) and make sure all plugins working, everything looks good on front end. Edit any plugins permissions if not working correctly. Basically verify that your blog on new host functions as designed and no errors present on Front end or back end.
Step 3: Pull the Plug On Old Host!
- Once you have verified that your blog works properly on your new host revisit your domain registrar and remove DNS servers for old host. From this point you should have there only 2 DNS servers defined by Hostgator (or whatever your host is). Save your changes.
- Edit your hosts file and remove static domain name resolution by either deleting the entry you have created or by placing a # sign in front of it. Use Ctr+S to save the changes to file.
- Use a ping utility and make sure that Dynamic Domain Name Resolution point to your new host. Please note that it might take up to 48 hours for the changes made to DNS servers in your registrar to propagate through internet. That is why we leave 2 copies of your blog running for this time.
In my experience it only takes couple hours for the DNS changes to propagate but to be on safe side I wouldn’t post anything for at least a day (give yourself a break, you know you deserve it!). Once you are sure that your blog is safely located on new hosts and all visitors access it and NOT old blog you can resume your normal posting and delete account on old host.
If this article didn’t help you, here are other articles that cover it in a different way:
Don’t have a good new hosting? I use and recommend Hostgator!
Tags: blog, hostgator, hosting, howto, howto-guides, WordPress34 Responses to “Howto Move WordPress To New Host”
Trackbacks/Pingbacks
-
[...] to a new web host, de Matt Cutts, How to move WordPress to new host, de WordPress Web 2.0 Spot-Er, How I move a WordPress blog to a new host, de Holy Shmoly, How to [...]
-
[...] Howto Move WordPress To New Host – if you actaully have decided that this is an option for you, use my guide and move your blog safely to a new host without any downtime. Article Series:WordPress GuideWordPress Guide – Dissection Of File StructureWordPress Guide – Dissection Of WordPress ThemeWordPress Guide – Customizing WordPress Theme Part 1WordPress Guide – Customizing WordPress Theme Part 2WordPress Guide – Customizing WordPress Theme Part 3WordPress Guide – Enhancing Image SystemWordPress Guide: Howto Force Your Blog Load Fast Previous in series If you’re new here, you may want to subscribe to my RSS feed. Or click here to learn What is RSS And Why You Should Subscribe. Thanks for visiting! [...]
-
[...] takes quite a while to boost my confidence to do it by myself, but these 2 tutorials at howtospoter and optiniche really is a time saver for me. Within an hour everything completed.However, it took [...]
-
RT @TheSpotter Howto Move WordPress To New Host http://bit.ly/14zPwQ even though it's from '07 some good info about DNS.
-
@mackcollier @travisinNC a pretty solid "how to" blog http://t.co/qPXpa9x


My entire process took me 3 hours and then another 2 hours before I made my new site as primary.
0 downtime and only one lost comment, which was made on old version of blog, which I can leave with …
Sure thing.
I do have to mention it was fully tested in my specific situation – moving from Site5 to Hostgator but should work for others as well.
Alex,
This is great! I was looking for this information to switch one of my blogs.
Thanks!
bizprofits’s last blog post..Learn How To Setup WordPress Videos
Thank you for the nice tutorial, I can move my domain now
That is really great. Gathering people with the same interest is really good. Thank you for expanding my knowledge.
I really liked your blog!
Nice writing style. Looking forward to reading more from you
Very nice information. Thanks for this.
You just did a great explanation for noobies like me… with PICTURES
. Thanks
. Long live google that it took me to your website.
This is what I was looking out for. last time I made on mistake by not taking backup of my database. I thought export option will do everything. Thanks for sharing your experience. BTW, you learn from your mistakes.
Hi and great walk through on this. I’m managing a few legacy versions of various WordPress installs and this was a good guide to move both hosts and domains around. For all those reading this thinking a domain and host move is going to be as easy as a new install, be prepared to spend some time and take the advice above in this post – Back up everything first. Great help to me, thanks.
your tips to resolve dns is working
thanks
Thanks for a great post. I’m fairly new to wordpress so this is really going to help ease the transition. I especially like the idea of adding to the nameservers to keep the site live.
I’m using cpanel & this should definitely help. I’ve done a complete restore on this particular blog when some !@#$% at the host thought it would be great to delete the site.
Always KEEP a recent backup folks! & not on the server!
I had to start the database from scratch, I really could have used this info then.
Thanks again!
Leah
Yep, backup is one thing that should be NEVER ignored!
It is also easy to backup and transfer all your websites from one server to another server if you have cPanel installed`-:
God BLESS YOU!!!
Thank you!
I assume my guide worked for you?