How to move WordPress site to new server with zero downtime

60734675 580651eb66 m How to move WordPress site to new server with zero downtimeIt often comes as a topic and I decided to write a quick tutorial on how to move your WordPress site from one host to another with zero downtime.

I will assume you are familiar with basic operations like database backup and FTP. So in order to transfer WordPress to new server you need to follow these steps:

  1. Backup the database from the old site and import it to the new site. Pay attention to database names.
  2. 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)
  3. Backup your entire WordPress installation from the old site (this will include all your uploads, themes, plugins)
  4. Unpack your WordPress installation to the new site
  5. Change wp-config.php on the new site with new database details
  6. Change the nameservers to point to the new site
  7. 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.

Update: You can use ManageWP to move a WordPress site with less hassle.


Please also check out ManageWP, One dashboard to manage all WordPress sites.

Related Articles:


Posted in: WordPress
TAGS:, , , , , , , , , , , , , , , , , , , , , , ,
Leave a comment

Comments:

68 Comments

  1. marco
    May 27th, 2011

    For some reason I also get the problem as a few have mentioned already. My front page works fine but none of the links work.
    I am sure it is something simple yet nobody mentioned a fix yet... ok thanks for the post anyway, cheers.

    • marco
      May 27th, 2011

      Stop Press, it fixed itself. I didn't do anything at all, maybe server needed time to catch up or something.. anyway.. happy! :))

      • May 27th, 2011

        Easiest way is to just use ManageWP.com

    • Dave
      Jun 3rd, 2011

      This is not uncommon. It does take up to 48hrs for a .com domain to fully propagate across the web. Once the full propagation happened, that's when the links started working.

      Note: - for .com.au domains, this propagation can take up to 7 days.

  2. Hkr
    May 5th, 2011

    Thanks. But I rally need some help. Does the root directory really matter ? I had my previous installation in some xyz/public_html/ . Can I install a new one in abc/ ? I ask because I found a string containing xyz/public_html/ in the database file

    • Hkr
      May 5th, 2011

      Really, not rally :) . By the way you have a really nice blog here.

  3. stevedeniro
    May 4th, 2011

    hello. just found your post and while it seems to handle most of my predicament, how does it apply to transferring info from a local wp install. could really use some insite. thanks.

  4. Contempo Curtains
    Apr 26th, 2011

    Thank you very much for posting this guide on how to transfer sites from one hosting to another. I just wish there were pluggins that could do it for multiple websites. I guest I just have to do it one by one. Thank you for your post... very helpful in many ways.

  5. Merv
    Apr 18th, 2011

    Thanks for the great tip. About to transfer my site to a new faster server and your guide is perfect. Gret idea BTW about making the database change first. Going to do that!

  6. Upni Duniya
    Mar 29th, 2011

    Hey, Thanks for this article, I was searching to migrate wordpress blog from 1 server to another server and I found your article and used the tips as you have mentioned. I used your steps and wow I did my job with 0 downtime.
    Thanks so much

  7. Sphinx Khan
    Feb 8th, 2011

    thanks a lot. Simple and to the point. I am getting a VPS for my blog and will be moving my site to the VPS within a couple of days. I will certainly share my experience with you once the entire transition is complete.

    Regards,
    Sphinx

  8. Gary LaBelle
    Oct 27th, 2010

    Vladimir, I wish to change this site over to a WordPress site. Are there a few things I should focus on to keep the "link juice" intact so I keep the search position that I have built up for years?
    Thanks Gary

  9. Clint
    Sep 8th, 2010

    I can't tell you how may things I read that didn't work, before I found this simple solution that did!

  10. Servers
    Aug 26th, 2010

    helpful article. Server downtime is never good. Thanks for sharing.

  11. Adonis Bjelic
    Aug 13th, 2010

    Thanks, Vlad. That was quick and easy guide, I just wish there was plug in or something to automatically do this. Problem I had was my new host does not allow IP to look up site, so I did not know if it was installed correctly until propagated, in our case about 15h. Also we had other scripts installed that needed special requirements. Nevertheless your advise is well appreciated.

  12. Aaron Newton
    Apr 10th, 2010

    This is basically correct, but with a few changes.

    1) You want to update your website A-record, not the nameserver itself. Updating nameservers will result in a delay of anywhere between 10 minutes and 36 hours, whereas updating your A-record should be virtually instantaneous. You should then set up your nameservers with the other provider and swap it over - this way you should have zero downtime.

    2) You will probably want to check that your site is working on the new hosting before you change any records or nameservers. You can do this by pointing your local hosts file to the new web hosting IP for that domain. See http://en.wikipedia.org/wiki/Hosts_file

  13. Naeem Noor
    Mar 20th, 2010

    Thanks for the tips, i just moved to another host without any downtime :)

  14. Neil Abraham
    Feb 2nd, 2010

    I followed all these steps BUT my links now don't work.

    I grabbed a backup of the old site, then I used fantastico to install a new WordPress account on my new server.

    I then did a "drop" of the contents of the new MySQL database and did a restore from the backup .sql file, which seemed to go ok.

    I uploaded all the old files provided, like templates, etc. I modified the config file to know the new database name and created the correct username and password on the server.

    I then changed the name servers to point to lunarpages and this morning it all came up looking like it was going to work.

    The front page comes up and looks fine.

    I can log into the wp-admin and everything there seems to work fine, all the old pages are listed and I can even modify the article called "home" and the changes appear fine on the website.

    BUT - none of the links from the front page work. They all give a 404 error.

    For example "about us" permalink listed in the admin editor matches the link that appears when you click the about us link on the front page, yet the two are not matching up

    Any idea why?

    • Nik Cree
      Sep 27th, 2010

      I am getting the same issue. Is there a resolution to this? Many thanks.

    • Sep 27th, 2010

      Try clicking Update permalinks from settings->perealinks

  15. david fu ta wei
    Dec 28th, 2009

    nice post.. do you agree to exchange link with me

  16. Kumaran
    Dec 24th, 2009

    thanks a lot Vladimir. actually i don't know that one can transfer a wordpress site without downtime.

  17. hagel IT-Service
    Dec 19th, 2009

    Thanks for the tips. We will try.

  18. Bill Kyle
    Dec 13th, 2009

    Vladimir, this works great. I just had to change Host. I used your procedure for a check list. When the nameserver changed in a few hours, every thing fell right in place. I don't think I had any down time.

    Thanks Bill

  19. Sohail Ahmed
    Nov 28th, 2009

    Nice tip! Thank you Mr. Vladimir :)

  20. Andy
    Oct 28th, 2009

    Very useful info on here as this process is full of pitfalls for the unwary. Just be sure to trace your steps so that you can always return.

  21. bisnis internet
    Sep 25th, 2009

    Thanks for sharing good information, i learn how to move wordpress here.

    Keep posting.

  22. Delton
    Aug 9th, 2009

    I have changed servers and I've changed the wp_config.php but I still can open my blog nor can I get admin
    to open. All I get is a blank page. Anybody have any suggestions

  23. Seth Goldstein
    Aug 3rd, 2009

    So will this work if I want all the widgets and plugins and settings to remain the same? I want to be able to just move it over to another server and have it be the same as it was on the previous server. Is this possible.

  24. Thorsten Albrecht
    Jul 16th, 2009

    Before I could activate my migrated wordpress installation (I just duplicated my installation on the same server) I had to change the value 'siteurl' in the database table "wp-options" by hand. Otherwise I would have been redirected to the old wordpress installation.

    Thorsten

  25. Make Money Easy Online
    Jun 30th, 2009

    Hi Guys.

    I am just wondering. Will it be possible to install a fresh copy of WordPress and over write the new database with old database?

    Care must ensure that both copies of the WordPress MUST be of the same version to prevent conflicts?

    I am going to change server soon and it is getting me paranoid with so many suggestions and ways to move a WordPress blog.

Have your say

Your email is never published nor shared. Required fields are marked *

*
*

Subscribe without commenting

About

vladimir prelovac Vladimir Prelovac is CEO of Prelovac Media, a computer engineer by profession and an adventurer by state of mind. more +


"I would love to change the world, I just don't have the source code yet."

Services

Manage multiple WordPress sites

Built for WordPress enthusiasts, ManageWP helps you manage all your WordPress sites from one central location.

Books

WordPress Plugin Devleopment Book Read my book WordPress Plugin Development: Beginner's Guide

Published by Packt Publishing, available online through Amazon.