Move your WordPress Blog to another host or server in 10 easy steps

Last week I moved this WordPress based blog to HostGator. Moving the blog to a new host service is usually a delayed decision for most people. This is mainly because of the fear of loosing data, potential downtime, lack of technical knowledge and even worries about the new service’ quality. Many times, people pay a lot more for renewing their current hosting services than switching to a cheap hosting that offer better service due the above worries.


Moving your WordPress blog is no rocket science and it is so damn easy if you follow the steps given below.

10 Simple steps to transfer WordPress to new Server or Host

Step #1 Prepare the new host space

Create a directory on your new hosting space where your blog has to be moved to. If your new host supports multiple domain hosting, you might want to add an addon domain using the cPanel. As much as possible, try to use the same directory name as your existing blog installation directory in order to simplify the moving process.

Step #2 Do a fresh WordPress installation

Now use your new host’s cPanel Fantastico tool (or the famous 5 minute install) to do a fresh WordPress installation.

You have to make sure that:

  • The new WordPress release version is the same or higher than your current WP release
  • Use the same admin panel login & password as your current installation, to simplify things
  • Use the temporary WordPress installation URL to fill the WordPress address (URL) parameter in your WordPress Admin=>Settings=>General page. Also, change the Blog address (URL) accordingly (e.g. something like http://YourHostServerIPAddress/YourAccount/

Visit your new blog installation using the ‘Blog address (URL)’ set above and make sure that the new WordPress installation (without your posts and theme) works fine. In order to avoid any accidental overwriting, you may want to keep a backup of your new wp-config.php in a safe place.

Step #3 Upgrade your current WordPress installation, if needed

From Step #2, if you installed a newer release of WordPress on your new host, make sure that your current WordPress installation is upgraded to that release via the standard upgrade process. It is better to complete the upgrade activities on your current playing field than on a new server and host. After the upgrade make sure that your upgraded WordPress blog and all your plugins work fine

(This step can be avoided if you decide to keep the target (new) WordPress release the same as your current one from Step #2. But this may not be possible when you use)

Step #4 Backup your current wp-content directory

Use your favorite FTP program (like the free FileZilla FTP tool) to backup the whole wp-content directory. In addition, you have to backup your robot.txt, wp-config.php and .htaccess files. Backup any other folders (e.g. download, temp, junk etc) and files that you might have created as well.

Step #5 Backup your current WordPress database

Use a tool such as phpMyAdmin (mostly available in your cPanel) to export your current WordPress database. Do not use the export feature in your WordPress admin panel as this would not take all your current settings but only the content (basically posts, pages, comments etc).

While using phpMyAdmin export, please make sure that you select:

  • All your WordPress tables and SQL as the Export option
  • Save as File

Now, when you hit ‘Go’ you will be prompted to save the database backup file on to your disk.

(Move to next page)

Pages: 1 2


  1. My brother just asked me to learn how to move the files to the new host yesterday and you write this tutorial. I’ll be following your tutorial to move my files when I switch my current hosting to Hostgator! Thanks for this tutorial Ajith! 😀


  2. Great tutorial, you have covered all points neatly.I was relaxing as Hostgator Guys did my host change.
    This tutorial is useful those who are in waiting to move to HG,like Arun.

  3. Great Ajith. I can imagine how much it took for you to put down all these steps in a proper format.

    Thanks a lot Ajith. I just bookmarked it for my future ref.

  4. It will help a lot of blogger out there, its good you are writing what you have experienced.

  5. Just my 2 cents Ajith

    1st hostgator is amazing as they provide free blog migration. But if anyone is doing of its own he should be technically sound else chances are high that he will Get into trouble…

    Meanwhile The procedure is very simple But need few careful steps …Like exporting and importing mysql database….

    more over I’m little unclear about the database thing which you have explained here…

    I will try to make it more simple..

    Export the database to you system

    Install Wp on new host…

    Drop all the existing tables on new host and upload the database…

    Configure the wp-config file for new database..and that is only 3 things needed to be chanved here…

    Upload the wp-content file which you have mentioned…

    Though there are few problem faced by new migrated blog like internal permalink might not work, home page will work fine but Internal pages will go blank….

    For such problems.. Make sure cache is cleared, check .htaccess file and 3rd solution is very silly and i.e = create a new page publish it and delete it…

    One problem which I have seen with hostgator is..when people use hotlinking protection from the panel.. The images will stop showing in feeds and many posts… I get in touch with them but that does n’t help all the time..
    SO for hotlinking protection..go for the safer way and i.e .htaccess method….

    • Hey Guys

      This articles seems to be very simple but I guess as mentioned by one of the member that you should be technical.. I guess there I am failing. I tried everything to move my well working site (still on my localhost) from one machine to another but getting 404 error on all the linked pages/posts except for the home page. Most likely permalinks issue as I have name-month based permalinks. I have installed latest wordpress and running it on winXP with wampserver. I verified cache, .htaccess etc. My htaccess looks like

      # BEGIN WordPress

      RewriteEngine On
      RewriteBase /heysri/
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /heysri/index.php [L]

      # END WordPress

      Appreciate if you can point me to right direction to solve this problem. It’s already 5days 🙁

      • Sri,
        The problem sounds like the permalink issue though I am not an expert in that area. Did you check out the hack that Harsh mentioned above (i.e. creating a dummy post, publish it and delete)

        • I had the same issue with the missing pages but just went into the post list, set the screen options to show a couple of hundred at a time, select all, edit, choose “published” – forces a rebuild of all the pages. Yes, it takes a little longer to process but it also got rid of my paranoia that maybe one was missing somewhere…!

          Excellent guide, thank you. Much easier than faffing around with WP export and stuff.

        • Update: found an easier way. Once the site’s up and no links are working, just go to Settings -> Permalinks. Change the link style. Click OK. Then change it back to the one you want and click OK again – everything sorted. 🙂

    • Brilliant !

      “3rd solution is very silly and i.e = create a new page publish it and delete it…”

      Saved me a lot of hassle 🙂

  6. but backing up wp-content file take much time to save, is there any way to reduce this time?

  7. Well luckily for me I have someone to do that for me.. 🙂

  8. @Lee, hope your brother can use the tutorial effectively.

    @George, definitely HostGator is a great hosting service when it comes to support. But not all other hosts are that good and we might need to do it ourselves or hire somebody. This is for those who do it on their own 🙂

    @Lax, thanks for bookmarking…

    @Shanker, thanks for the compliments buddy.

    @Harsh, experienced people may take the route you mentioned. The approach I explained here does not include any drop of databases tables, no configuration to be done etc.

    @teratips, there is no short cut buddy. wp-content contains your themes, current plugins and uploaded images etc. You have to make sure that whole of it is backed up.

    @Custom Essays, exactly!

    @Melvin, great… but not everyone else is as lucky as you 🙂

  9. Great detail – has all that is needed for the move. If you had put this up a bit earlier I would have moved hosts instead of struggling and renewing !
    Will come back in 6 months time :-).

  10. Great tutorial dude! You’ve also got a lot of nice WP content and info here…will definitely be back.

  11. @Sushil,
    Give it a shot with courage next time 🙂 It’s a lot simpler than we think. And if you do the transfer a week or ten days before the existing hosting account expires, you have enough time to sort out thinks.

    @Max, Welcome to DollarShower. Please do come back with more comments and opinions 🙂

  12. thanks for this information…will surely use it for our new updated wp website that is going live today or tomorrow to promote our dhow sailing, dolphin spotting, and snorkeling services here on kenya’s indian ocean coast by shimoni & wasini island. having problems connecting to our ftp server to install wp though…bummer.

  13. Great post ajith,

    THis will help me for sure in near future as i am thinking of moving to some other host. May be hostgator 🙂

  14. Thanks for the tutorial, i already move my blog.


  15. Thanks Ajith for your prompt response.. I tried all the three options suggested by Harsh. None is working. But, Yes, if I change the permalinks to ID based i.e. http://hostname/?p=10 it worked. All the pages work with ID based permalinks.

    I am using wampserver since I am still on localhost.I have to launch this on October 20. So I am worried if it will work when Iwill move it tohosting server. Appreciate if someone can help me!!

  16. woops, not sure what happened but some text went missing, must be too much coffee and an empty stomach. Please post this instead:

    I know this is sort of out of the remit of this tutorial but I am trying to move my wp site from the net to my local web server on my computer but I’m having some problems. I’d really appreciate help!

    I followed your guide to the letter but as soon as I switch to the current wordpress database – Step 7 – I get a completely blank screen (no source even). If I attempt to navigate my browser anywhere, like index.php for example, the browser attempts to download the page as a file instead of loading it.

    Something is obviously wrong, but what? My .htaccess file looks like this:

    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    Thanks for the great guide Ajith.

    • @Dan, did the issue get solved?

      The .htaccess looks fine. However, are you using your hosting service’ temporary URL to access your WP blog or your domain name directly? The AddHandler for PHP5 sometimes doesn’t work on temporary URL and hence it might try to download PHP files. I suggest that you contact your hosting provider to debug it faster…

  17. Hey Ajith,

    thankyou for your response. I actually solved the problem, phew!

    Basically, I had to modify all the entries in my exported database to point to the new url (ie http://localhost:8888/… ) before I imported them into my local database. My website txt editor dealt with this easily using its search and replace feature. After having done that, and after making sure that my new database was utilising the same encoding as the last, things are working ok.

    Sorry for emailing in such a panic 😉
    All the best,

  18. hey howto shift from blog to hostgar

    • @Himanshu,
      If you are taking a new hostgator hosting, they will help you with the move. Even otherwise it’s pretty straightforward. Once you setup a new WordPress installation, all that you need to do is to ‘import’ (from Tools menu) your data (You have to first export the current data to a disk file and use that to import into new WordPress selfhosted db)

  19. Hello,

    I have a question. You have said:
    (e.g. something like http://YourHostServerIPAddress/YourAccount/

    So can I access my hosting account – without specifying it as – using the IP Address and Account Name. Note the IP Address here is a Shared IP.


    • Ashwin,
      That’s right. There will be several domains hosted on a single address and they use the shared IP + account name combination to reach your folders.

      So even when the DNS setup is not effected you (or others) can directly access your folders

      • Ajith,

        Yes I too thought the same way. But I have a hosting with but http:/ /IP/username or http:/ /IP/username/domain doesn’t take me to the needed location.

        I am locating the shared IP from the cPanel. Any idea what could be the problem?


  20. Man… ‘~’ before the username really helped. You definitely saved a lot of work for me – working with a client. I am developing on my platform – because his DNS is pointing to this existing site which he does not want to lose but we are porting his site to a new host.

    Great help. Appreciate it…


Speak Your Mind