Having done this just recently (in fact this is a first post on a new host) here is step-by-step tutorial on how to do that with zero downtime.
- Backup the database from the old site and import it to the new site. Pay attention to database names.
- Change your wp-config.php in the old site to point to the database on the new site. Your old site will now run using database based on the new site and once you change the nameservers new site will have the up to date database. (You may want to check with your new hosting if they allow outside database access first. If not, you can skip this step and transfer the database at the end, when the nameserver change propagated)
- Backup your entire WordPress installation from the old site (this will include all your uploads, themes, plugins)
- Unpack your WordPress installation to the new site
- Change wp-config.php on the new site with new database details
- Change the nameservers to point to the new site
- That’s all now you only need to wait
Since nameserver propagation can take up to one day, step 2 allows you to have up to date database at the moment it happens. Downside to this is slower site response in the meantime because site still runs from the old server and the database is on the new. But if you do this over the night or periods of low traffic it won’t be that noticeable and you will not lose any comments or other activity on your site.


November 6th, 2008 at 1:57
@doug -
How did you do that, Doug?
October 24th, 2008 at 3:08
I moved to a new host a couple of months ago and my biggest problem was I forgot to change the config file.
I wish I had seen this first.
October 11th, 2008 at 19:12
Toi muon thu ma thoi
October 4th, 2008 at 13:58
I’m planning to move my blog to a dedicated hosting site soon. My biggest concern is them trying to take over my domain name. Their tech support assured me they won’t do a domain name transfer, but I’m a bit skeptical.
October 1st, 2008 at 7:04
Thanks for this! So simple!
Great job!
September 30th, 2008 at 7:49
Well, I’d written a similar post and I hope you find that useful too. I loved your post title by the way and that is what actually enticed me to look at the post. Great article.
September 30th, 2008 at 6:26
Good info… it’s better with no downtime..
September 29th, 2008 at 23:01
An awesome tutorial! Well done, and thanks for putting that together.
September 29th, 2008 at 21:25
Before you start all this process, check if new host allows direct access to database server remotely. It is common that database is accessible only on localhost, for sake of the security.
If that is the case with your new server, you would not be able to connect to database from your old site.
September 29th, 2008 at 19:05
Good info. If you use cpanel and are moving to another cpanel host, you can actually transfer the new site completely from the new cpanel without downloading anything. I was able to transfer a number of wordpress sites in about 10 minutes or so with cpanel. So be sure to keep that in mind if you are pondering a switch. if you are not using a host that provides cpanel and are planning a move, make sure to seek out one that offers cpanel for management.
September 29th, 2008 at 12:08
Great, I didn’t know that ; /
I made a mistake, I do everything on the same way like you sad but with no step 2 :D.
September 29th, 2008 at 10:06
If you follow step 2 you will have no downtime and no lost comments!
September 29th, 2008 at 9:23
Very nice and easy to understand explanation.
Maybe its better to put some text on your site while moving it to another server, something like, please came tomorrow or under construction because i have problem with comments.
I change my host one week ago and lose some comments. They send comments but on old host and they never came to my new site.
September 29th, 2008 at 7:08
Hi, this could be works if I migrate my wordpress site to my local machine????
Thks
September 29th, 2008 at 0:40
I am glad this helps. I am also glad to hear the site is faster for you, that was one of the main reasons I moved. The other being security issues.
September 29th, 2008 at 0:29
Well done and thanks for the valuable info since I also have the intention to switch my server to a better one.
In fact, I notice that your website now loads more quickly than before.