Tutorial – How to move WordPress site to a new server or host

April 21st, 2009 | Comments 31 Comments | 1,664 views

I recently switched from one hosting company to Namecheap hosting and I had to transfer my WordPress sites to this new server. I searched a lot for tutorials on transferring wordpress sites and after reading many tutorials I successfully transferred my sites.

In this post I am going to combine all those tutorials and making a single and easy tutorial for you to follow and easily move your WordPress sites to a new host or server. Downloading the WordPress files is not that difficult but moving database to a new server is a little technical.

Step 1: Open FTP program or login to cpanel through web and go to the Public_html directory where your WordPress site is located. You should see your files like this

allfiles Tutorial   How to move Wordpress site to a new server or host

Step 2: Download all these files to your local computer.

Step 3: Now you need to download the database file too. For that you should go to cpanel homepage and click on the PhpMyAdmin link as shown in the image below

phpmyadmin Tutorial   How to move Wordpress site to a new server or host

When you click on the link it will take you to a page where you can see all the databases you have on your server. You should select the database from the list which you want to move to the new host.

In my case the database name is wrdp2 but yours could be anything.

select database Tutorial   How to move Wordpress site to a new server or host

Step 4: When you click on the database name you will see these options on the right side of the panel.

export database Tutorial   How to move Wordpress site to a new server or host

Select the “Export” option from the menu.

Step 5: When you hit the Export button it will show you ask you how you want to save the database file. You should select the option “Save As File” and name your database file whatever you like and press the GO button. In my case I am giving the name to my database file as sitereviverdb as shown in the image below. It will download the database with this name which we will be uploading to the new server.

export select all Tutorial   How to move Wordpress site to a new server or host

export databasename Tutorial   How to move Wordpress site to a new server or host

The browser may prompt you if you want to download the database file or not, select YES.

database download Tutorial   How to move Wordpress site to a new server or host

Now you are done with the old hosting company. You have successfully downloaded the wordpress files and also downloaded the database file.

Now you should login to your new hosting account and follow the steps mentioned below.

Step 6: Upload the WordPress files you downloaded from old hosting to the public_html folder or if the wordpress site is on addon domain then upload the files to that folder.

Step 7: Now we need to create a new database which will be used by the site. Go to your cPanel homepage and click on the MySQLDatabases link as shown in the image below.

mysql database Tutorial   How to move Wordpress site to a new server or host

Create a new database and to keep the things simple and clear name your new database EXACT as you saved the old database file. In my case I saved my database file as sitereviverdb.sql so I am going to create the new database on this new server with the exact name sitereviverdb

new database Tutorial   How to move Wordpress site to a new server or host

Step 8: Create a new MySQL user.

newuser Tutorial   How to move Wordpress site to a new server or host

Step 9: Now you need to give access to the user for the database you just created. Give the user FULL access.

permissions Tutorial   How to move Wordpress site to a new server or host

Step 10: Go back to the cPanel homepage and go to PhpMyadmin.

phpmyadmin Tutorial   How to move Wordpress site to a new server or host

When you go there you should now see the database name, which you just created, on the left side of the page. Click on the database name and you should see the option “IMPORT” on the menu on the right side.

import Tutorial   How to move Wordpress site to a new server or host

Choose the database file you downloaded from old server and click the GO button to upload it to this new server.

Note: You are still not done, you uploaded wordpress files and database but you didn’t make a connection between them. To make the connection between database file and wordpress you should configure the wp.config.php file which you can find in the main folder where you uploaded the wordpress files.

wpconfig Tutorial   How to move Wordpress site to a new server or host

Open that wpconfig.php file and you should see this information. You should enter the database name, database username and database password as I have written in here.

wpconfig setting Tutorial   How to move Wordpress site to a new server or host

And you are done icon smile Tutorial   How to move Wordpress site to a new server or host
Now you can login to your wordpress admin panel with the same username and password you used to login before.

I hope you find the tutorial easy to understand and useful. If you are having any problem please feel free to post your comments/questions and I will try to help you as much as I can.





About Site Reviver

SiteReviver is an informative blog, where you can find good resources about web design, development, hosting, seo and more. If you have something to say, feel free to leave your comments or contact me if you enjoy writing for this blog!

  1. Harsh Agrawal

    Very useful tutorial man

  2. Sayz

    This is a useful post for every wordpress user,
    nice work… :)

  3. Zac

    Umm, ok, you moved the database and the files. But you left out something pretty big, this only works when keeping the same domain. How are you going to direct people to the new site if the domain or sub domain changed? I suggest you add that as a follow up, mostly i would say because a lot of people start moving from a wordpress domain to their own, and it can be a pain.

  4. Jahangir

    Hello Zac, you raised a good point. Actually I was not changing my domain that’s why I didn’t pay any attention to that part.

    OK, I will update this post with the instructions on that part as well.

    Thank you :)

  5. Sajid

    This is one excellent looking theme. It really does have some nice features. Great work!
    Thanks for the tips.

  6. Kanu

    I have a question. Is it possible to move the blog to a new directory with a newer, upgraded wordpress version. I can not access my admin page of current blog and I have installed a newer version of wordpress in another directory and want to import my old posts and comments to this new version wordpress. I do have the wordpress sql backup of old blog. Is it possible to move the database alone without all the old files?

  7. Jahangir

    Hello Kanu, I am not sure about it because I have not tried it. If you ask this question on our webmasters discussions forum (www.decentdiscussions.com) I am sure someone will be able to help you.

    Thanks

  8. Nicola

    Hi there! Thank you so very much for sharing what you learned with us.

    I had been searching all over the Internet for up to date information on this very subject.

    Your instruction was the jewel hidden in the junk pile.

    Thanks again!

  9. Sajid Latif

    This is a useful post for every word-press user… :)
    Very useful tutorial man

  10. Wordpressthemegenerator

    It really does have some nice features. Great work!
    You can also find Online Word-press Theme Making at my Link or Website… Check it.

  11. ankita

    hi!!
    i was changing a php code for header image o change it but i dnt know what happen but now i cannot access my word press site…it is not opening up..please help me out,i am new to word press..

  12. Jahangir

    ^ I did not say anything about changing header image? I am sorry but I don’t know what did you do that went wrong.

  13. ejakulasi dini

    Thanks for the tutorial, i already move my blog.

    Dini

  14. Gayle Howard

    Your instructions are excellent, but I hit a snag. When I go to import my database (which is only 946k) it just sits there thinking uploading and uploading. So far half an hour and I’m on broadband. Any ideas why it would just stick like that?

  15. Jahangir

    I am not sure what is the cause of your issue. What browser are you using? may be you should try logging in to cPanel from some other browser?

  16. Amy

    I just wanted to say thanks. I am moving my cheesy recipes site and I think with this tutorial, I will be able to move it successfully.

  17. rahasia sulap

    I just moving my wordpress, thanks for the tutorial guide.

  18. trysso

    It was a great guidance as I`ve got a plan to launch my new blog from free hosting on wordpress.com to the new self hosting. So May I have my questions answered.
    Can all the links within post be transferred into new hosting?
    What minimum bandwith is needed to get new self hosting blog with wordpress platform crawled by search engine?
    do we still need wordpress.org software to get our free blog wordpress .com transffered into new hosting platform?
    A million thanks for any information.
    Good Luck

  19. Jahangir

    @Trysso, I try to answer your questions one by one.

    1. Links withing the posts:

    I am not sure about this because I have never tried transferring blog from wordpress.com to self hosted site. But I think they will work fine.

    2. Minimum bandwidth:

    Don’t worry about the bandwidth because blogs don’t use much bandwidth. I guess you don’t have many images (big size images) on your blog. Because if you have big size images then it will slow down the site loading speed.

    Decent Weblog consumes less than 10GB bandwidth per month :)

    3. WordPress.org software:

    Not sure about it, sorry.

  20. Car Insurance Guy

    Ah!!! at last I found what I was looking for. Somtimes it takes so much effort to find even tiny useful piece of information.
    Nice post. Thanks

  21. Joe

    Can this process work when changing form one domain to another? Not just wordpress, but other pages I may have on the domain.

  22. John

    Hi Jahangir

    My host changed servers and all websites now have a new IP address.

    I have the same domain name and I assume the host runs the same nameservers, though my host and domain name provider are different.

    Note I never entered into my blog, a Name or description under General/Settings. I left them both blank. That is when I could log into it.

    Note: the wp-config file, has ‘localhost’ entered rather than a specific IP, again this has always been the case and my host never advised otherwise.

    I can get into Cpanel but simply putting the newly advised IP infront of ‘/Cpanel’ however I can not reach the admin panel of my WordPress blog.

    I had been loggin into it via
    http://xx.xx.xxx.xx/~abcefg/abcefgblog/wp-login.php, my host suggested to simply insert the new ip in place of the old one. I still get the error message

    “404 Not Found

    The server can not find the requested page:
    Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.12 Server at 74.50.108.14 Port 80″

    After finding this link

    http://stackoverflow.com/questions/535534/wordpress-host-ip-changed

    I have logged into myPHPadmin and found the wp-options table and searched for “SELECT * FROM `wp_options` WHERE `option_name` IN (‘siteurl’, ‘home’)”

    Only option ID 39 came up and the results are
    ‘Home’ has optionvalue
    http://abcefg.org

    ‘siteurl’ has optionvalue http://abcefg.org/abcefgblog

    Both of which appear correct. Is there any part of the mysql tables where I can change an actual IP address? Or is there something else you can advise?

  23. Site Reviver

    Hey John,

    I am sorry but your issue is very weird and I don’t know anything about it.

    I would recommend to post your question on our forum so that members who know about it can help you.

  24. Deviled Egg

    This seems like the easiest to follow tutorial for moving wordpress site to a new server. Thanks for the info! I’m going to give it a try.

  25. fix bad creditzisaSkacick

    This may be a quality web-site.

    I’ve bookmarked this web page and also I’ll tell my friend about it.

    Many thanks

  26. Free international call

    http://www.sitereviver.com; You saved my day again.

  27. Online Nursing Programs

    Comment…Awesome tutorial man , i just followed your step and switched my word-press site to a new domain. keep up the good work , and keep posting .

  28. Site Reviver

    ^ I am glad you followed the tutorial and got your site switched without any problem :)

  29. Get Laid

    I wish I had found this blog earlier, thats all I can say, it would have saved me the huge headache I ended up with.

  30. Pete

    Hey just tried this out. but it did’nt work, so I’m going to give it another go.

  31. Online marketing companies Delhi

    I think this post is very useful and effective for every word-press user.

Trackbacks

Page 1 1