How To Move a WordPress blog to a New Host

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

This is the WordPress logo. Why are you pointing at it?

I recently changed my webhosting provider. Hence, I had to move all my sites from the old host to the new one. Doing this with static HTML/CSS sites is simple enough. But for a database backed script like wordpress it can turn out to be quite tricky.

I’ve heard this question being asked quite often by friends on Personal Messenger and on webmaster forums. That is why I made a step-by-step tutorial on how it is done.

1. Find out the name of the MySql database you’re using for the wordpress blog. Download this database to your localhost. If your host offers cPanel, then you can use phpMyAdmin to do this.

2. Open phpMyAdmin. Select the name of your database. Click on the “export” tab. Select all. Export them as an SQL file and save it on your PC.

3. Copy all the wordpress files and save them on your localhost. This includes all the files and folders in the directory for your domain. So you should have a bunch of files, and the wp-admin, wp-includes and wp-content directories. The image makes it clear:

4. Now change the DNS settings for your domain and point it to the nameservers of your new web host.

5. Create an addon domain (if required) with the new host and copy all the files and folders from your previous installation. Move the folders as they are. They should include the files and folders showing in the image above.

6. Now it is time to work with databases. Create a new MySql database and assign a user to it. You can do this easily from cPanel.

7. Open up the wp-config.php file from the root directory of your domain/blog. Edit the name of the database, username and password to match the new ones you just created in step 6.

8. Remember the database you downloaded way back in step 1? Time for it to be uploaded to the new server/host. Open up phpMyAdmin. Select the name of the new database you created for wordpress and click on the import tab.

This is the phpMyAdmin import tab

9. Browse to the saved .sql databse and click on Go to upload it.

10. Voila! You have moved your wordpress blog to a new host!

This may take some time, but it is the most fool-proof way to move your wordpress sites/blogs to a new hosting provider/server.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. An easy way to use images in your blog posts – ImageShack WordPress Plugin
  2. The easiest way to optimize your websites for search engines – WordPress plugin

7 Responses to “How To Move a WordPress blog to a New Host”


  1. 1 Grant

    Hi

    I am not clear on point5, where do I save the wp-admin, wp-includes and wp-content directories.

    Thanks
    Grant

  2. 2 Shypy

    Grant, you just overwrite them over the newly installed ones in the new hosting account.

  3. 3 Francis

    Thanks for the info!

  4. 4 robert

    I have followed the steop you gave but my wp-cinfig.php keep s changing back to the original for some reason…am I missin a step here?

  5. 5 Paul

    Hi,

    Thanks for the steps. I followed them to the letter, but it appears I was unsuccessful. When I try to access the domain in my web browser I am told that there was an “Error establishing a database connection.”

    When I attempt to access the WordPress admin area, I am told that “We were able to connect to the database server (which means your username and password is okay) but not able to select the xxxxxxx_xxxxx database.”

    (I removed the actual database name for security purposes.)

    I tried clearing my cookies and my cache but I still get the same errors. Please let me know what I should do.

    Thanks,
    Paul

  1. 1 The Easier Way to Move A Wordpress Blog to a New Host | Shypy's Weblog
  2. 2 Moving a WordPress Blog to a New Host | Welcome To Bilbob's World

Leave a Reply