How to Move Your WordPress Blog to a New Server

If you ever need to move your WordPress blog (as I had to do recently from Bluehost to Hostgator!) here are the steps to take to make it go smoothly.

On Your Old Hosting Account

In phpMyadmin click on the database for your blog then export and save the database to your hard drive

In your FTP programme save your theme, the plugin folder and the uploads folder to your hard drive

(these are usually the only files that have been added to or changed - if you have made any other changes you’ll have to save the changed files as well)

The next steps are different depending on whether you already have another hosting account or are starting a new one.

If You Are Starting a New Hosting Account

If you are starting a new hosting account set it up with your blog’s domain name

Then change the nameservers for your blog domain to point to your new server - for a new hosting account the nameservers will be emailed to you or you can find them in the sidebar of your cpanel

If you already have a Hosting Account

Change the nameservers first then add the blog’s domain address as an addon domain - In this case a new folder will be made with a name you choose

At Your New Hosting Account

Make a new database and assign a user and password to the database

Import the saved database to the new database

On the Cpanel find Fantastico if your host offers it and make a new installation of WordPress for the blog’s domain - If there is no Fantastico you’ll have to upload the WordPress files and install it yourself

Now you need to change the wp-config file to point to the new database instead of the default one created by Fantastico

In your FTP client save the wp-config file to your hard drive - for a new hosting account this will be in public_html for an addon domain look for the folder you made when you added the domain

Open up the wp-config file and change the ‘DB_NAME’, ‘DB_USER’ and DB_PASSWORD for the ones you made earlier. The part to change looks like this

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define(’DB_NAME’, ‘xxx’);

/** MySQL database username */
define(’DB_USER’, ‘xxx’);

/** MySQL database password */
define(’DB_PASSWORD’, ‘xxxx’);

/** MySQL hostname */
define(’DB_HOST’, ‘localhost’);

Save it and upload it to your server

Now you need to replace the plugins and uploads directory on the server with the ones you saved earlier. Also upload your theme to the themes folder

You’ll need to wait a while for propagation of the nameservers but when they are changed you should see your blog on the new server

38 Responses to “How to Move Your WordPress Blog to a New Server”


  1. 1 Catherine | Natures Sunshine Store

    A always love wordpress. And now that i have bought my own domain name and hosting, this post will be useful once I reached the point of transferring my blog. Thanks for sharing it with us.

  2. 2 ajay@Christian Counselors Dallas

    hi.
    that is really great post. Very useful information provided.
    i like wordpress sites..
    thank you.

  3. 3 sitecore

    hi,

    your post is great very informative, I was thinking to do that but couldn’t found the method
    thank you for sharing that useful information,
    Thank you Keep sharing.

  4. 4 Swarovski Crystals

    Thank you for posting this. My sister recently bought her own domain and has been bugging me to move her wordpress blog to a new server. I have been putting it off because I just couldnt find any “how to’s” on the web that is readable and easily understood by someone like me. you certainly hit the spot on this one. Thanks.

  5. 5 Busby SEO Test

    Truly moving to a new server is something that I worry about because my friends say it could lose many parts of my content, is that true? And one more thing is that some Wordpress plugin to do so?

    Because I’ve been thinking to move to Hostgator, is Hostgator a good web hosting?

  6. 6 KDL-46XBR8 TV Store

    Thanks for the info. I will definitely use this once I’m ready to move my wordpress to a new host. I too also worry about losing some of my contents. Will I lose any?

  7. 7 calabria property

    I like it. I am very glad to read your post. I work on word press for my site.

  8. 8 Jeet

    ‘if’ there weren’t too many custom changes and mods, I just install a new blog on the new host, export posts (and other details) from older blog and import them in new server.

    The only thing that you need now is the theme. That needs to be FTPed. I found this faster and easier than changing db configuration and FTPing all files and importing DB.

  9. 9 LOSE WEIGHT

    i don’t know about method

  10. 10 amrita@Web Hosting Dubai

    thank you for sharing that useful information,this is really helpfull for my blog

  11. 11 Article Directory

    I am very glad to read your post because its too much informative.

  12. 12 derl

    i hope i never have to move everything, its such a pain since phpadmin is limited by the size of the database it can export and import and then you need to do it by the command line in mysql which i have no clue how to do even after reading how

  13. 13 personal injury

    Thanks for the informative posting. Keep sending them to aware us about whats going on. I am going to move my blog to the new hosting. :)

  14. 14 Poker Paypal

    I read your last articles about how to create blog with the help of wordpress and I am really impressed with that. Although rite now I am not in need of this one to change the hosting but however I read it to get an idea how it works.

    Thanks once again.

  15. 15 Max

    It’s good idea to archive all files on old hosting (usually .tar.gz) and upload archived file to new hosting and extract there.

  16. 16 Limoeg

    It is very helpful.Thanks.

  17. 17 ipod speakers

    helpful post I like it.

  18. 18 Poker

    For me it sounds like Mission Impossible!
    I thought about changing lots of times, but I think I’ll ask someone else to do it..
    -.-

  19. 19 HostGator Reviews

    Welcome to the world of HostGator. We would love to read your review! If you get a chance why not stop by and let us know how things are going for you. If you are not currently a HostGator client and would like to learn more about this awesome hosting company feel free to check out some of the excellent reviews!

  20. 20 Dana Blackhurst

    It does sound kinda like mission impossible, lol, very cool!

  21. 21 free coupons

    Great information I was just thinking that moving the blog is not possible, you did a great help thank you…

  22. 22 poster printing

    Really it is very useful and thanks for sharing it.

  23. 23 Agitationist

    Great tutorial. I would recommend leaving the old one up until you’re sure the nameservers have updated, and have some friends check to make sure they can see it too. I had one site that I could see, but others couldn’t for several days.

  24. 24 janetra

    Agitationist Good point about leaving the old one until the new domain has propogated.

    Busby SEO Test I’ve been using Hostgator for while now and find them excellent so far. Unlike Blue Host which dumped me for allegedly using too many resources. I swapped all the sites that were on Blue Host to a baby croc account and they are working fine.

  25. 25 Adult Web Design

    As long as you make good backups, you should not have an issue. If a problem does come up during the transfer, at least you’ll have all of the data stored from the backup.

  26. 26 Weight Loss Help

    you forgot to mention moving .htaccess file to new server. … If you have any thoughts on How to Move Your WordPress Blog to a New Host, please share them …

  27. 27 Free Money Saving Tips

    I shifted 33 sites to Hostgator back in September and could have done with this information to make it easier for me. It is extremely thorough and invaluable.

    I did, however, find the online chat at Hostgator an excellent service and can’t speak more highly of their Technical Service, as well. I would highly recommend them and the information given here when you next want to switch hosts.

  28. 28 eblogger

    Thanks for the Detailed Information. I am planning to shift my hosting.This info. will help me and other bloggers.
    Thanks
    eblogger

  29. 29 web tasarımı

    Sorry my english firstly, i read well but i cant write :), So its useful post for me and i bookmarked your blog.

  30. 30 Rebar

    I like it and thanks for sharing it, really it is nice post.

  31. 31 Flowers Online

    Hi, i have a free wordpress blog. I have added the widgets that come in the widget section. But how do i add widgets that are from third parties such as clustrmaps? If free wordpress blogs don’t allow that, which free blog service allows that ?

  32. 32 shelly wagar

    This info is really helpful, thanks

  33. 33 Bathroom Furniture

    :twisted: Sorry to say , however, find the online chat at Hostgator an excellent service and can’t speak more highly of their Technical Service

  34. 34 Credit card debt

    When I moved almost all of my websites to a dedicated server at new server about 4 months ago, I thought I would be getting some peace of mind, but I had no idea about all of the other great things that would result from having a managed, dedicated server of my own.

  35. 35 pet care

    I always get a knowledgeable tech on the phone within a minute or two of calling and I’ve never had to wait on hold for longer than two minutes ~ever~ and in the beginning, I had to call quite a bit and while I don’t have experience with LiquidWeb’s shared hosting, I can honestly say that as a dedicated server customer, you get treated with a lot of respect and get premium service. I never had that feeling in all the years I used distribute hosting.

  36. 36 Bingo Live

    thanks for giving the useful and creative for tools and information how to create and max use the wordpress.

  37. 37 Singapore Property

    Hey!Great information! The many “ifs” that you mention are mostly what I’m looking for!

  38. 38 Calabria property

    Now if you write an idiot’s guide to upgrading from Wordpress 2.5.1 to 2.7.1, that I’d want to read avidly.

digg this
Subscribe to My Feed AddThis Social Bookmark Button

Leave a Reply