I have seen many requests online on how to move a WordPress blog to a new server or host- including requests from some of my readers.
It seems as though the easy part is transferring the files. What most people find difficulty with is moving their WordPress database to the new server or hosting company.
While there are other tutorials available online, many seem to lack clear instructions on how to move your blog. In this tutorial, I’m going to take you step-by-step and show you exactly how to move your WordPress blog to a new server or host.
It may look difficult at first with all the steps I’ve included, but I assure you- it’s easier than it looks- especially after you move a blog a few times. It may seem like there are many steps to moving your WordPress blog to a new server, but there really aren’t that many. I’ve just broken each step down to make it very clear even to beginners exactly how to move their WordPress blog.
So, are you ready? Here we go:
Open either your FTP program or your file manager through your hosting company and browse to your home or public_html directory. With WordPress installed, it should look something like this:

You want to download all the files and folders to a convenient location on your computer, then upload all the files and folders to your new server/host.
Once you have all the files on your new server/host, you need to download a copy of your original WordPress database from your original host.
(All of the following screenshots were taken from cPanel, but if your host uses a different administration panel, the steps will be the same- they may just look slightly different.)
Once logged in to your administration panel, go to phpMyAdmin.

Once you click phpMyAdmin, in the left column click on the database that is used for your original WordPress blog.

You should now see the name of the WordPress database in the drop-down box and all the WordPress tables listed underneath. The tables you have can be different than mine because the WordPress plug-ins you use will determine what tables you have in your blog’s database.
Regardless, it should look something like this:

Now in the main window, click the tab at the top of the screen that says “Export”. In the “Export” box, all of your WordPress database tables should be highlighted.

Underneath that, check the box that says “Save as file” and name it whatever you want, then click “Go” to download your blog’s database.

Click the “Save” button to save a copy of your WordPress database to a convenient location on your computer.

Congratulations! Now you’re done with your old server/host! It’s time to move on to the new server/host.
Login to your new server/host’s control panel. The first step is to create a new database that will be used for your new WordPress Blog.
Click on “MySQL Databases”.

Under “Create New Database”, enter a name for your new WordPress database, then click the “Create Database” button.

Now that your new WordPress database has been created, we need to make a new user for that database. Usually on the same screen you’re at, you have the option to create a new user.
Enter a name and password for the WordPress database user and click the “Create User” button.

Now you have to give that user permission to use your blog’s database. Again, usually on the same screen you will have the option to add that user to the database. Select your WordPress database and the user you just created, then click the “Add” button.

On the next screen, you have the option to grant which permissions this user has to your blog’s database. Be sure to grant this user total access to the WordPress database by checking “All Privileges”, then click the “Make Changes” button.

You should get a confirmation telling you that the user has been successfully added to the database.

Now that your new database has been created, we need to import your old WordPress blog’s database contents into your new database.
Back in the main window of your control panel, click on “phpMyAdmin”.

In the drop-down box in the left column, select your new WordPress database that you’ve just created. It should say that there are no tables in the database yet, since it’s a blank database that you’ve just created.

In the main window, click the “Import” tab. Under “File To Import”, click the “Browse” button and select the .sql file that you downloaded from your old WordPress database, then click the “Go” button.

After waiting for the entire blog’s database to import, you should get a confirmation telling you that the tables have been successfully imported. Again, the number of queries that were executed may be different than mine, depending on which plug-ins you have installed.

Now in the left column, you should be able to see all the WordPress tables that were just imported.
If your new WordPress blog is using a different domain name than the original, we need to modify three values, and they are all located in the “options” table.
Even if you are using the same domain name, there is one option you may have to change. I would recommend you continue to follow along, even if your new WordPress blog is using the same domain name as the original blog.
All of the changes we need to make are located in the options table. My options table is named “wp1_options”, but yours may be a little different (probably “wp_options”), just as long as the suffix is “options”.

After you click on the options table, click the “Browse” tab at the top of the page.

One of the option names will be “siteurl”. You will see that your original domain name is listed. If your new WordPress blog is on a new domain name, you need to edit that value to your new domain name.
You can do so by clicking the “Edit” button, which looks like a pencil.

Once you click the “Edit” button, just enter your new blog’s URL and then click the “Go” button to save the changes.

The next two values we need to change are usually located on page 2 of the options. At the top and bottom of the main window, you should see the heading “Page number” with a drop-down box. Select page 2.

Scroll down until you see the “home” option. Again, you will see your old WordPress blog’s URL. Click the “Edit” button which looks like a pencil to modify the old blog’s URL.

After you click the “Edit” button, enter your new WordPress blog’s URL, then click the “Go” button to save the changes.

The third and final value we need to change is the upload path. This is the location where WordPress will upload all of your images.
Scroll down until you see the “upload_path” option, and again click the “Edit” button that looks like a pencil to modify this value.

Now you need to enter your new upload path. The only part of your new upload path that you need to modify is the username that your hosting company gave you for your domain name.
This is usually just after “/home/”, and in my case is “jrivnet”. Replace this with your new username. This is usually the username you use to login to cPanel, or your domain’s control panel.

If you are still unsure as to what it is, take a look in the left column. Your username is the prefix of your WordPress database. Notice how mine is “jrivnet”.

Once you’re done with that, click the “Go” button to save.
WHEW! You’re finally done with all the database stuff! Your final step is to go to your wp-config.php file of your new WordPress blog. This is in the root folder of your WordPress blog (usually /home/ or /public_html/). You can do this with your FTP program or the file manager for your new WordPress blog through your hosting company.
Find the file “wp-config.php” and click “Edit”.

Once the “wp-config.php” file is opened, the first things you will see are:
DB_NAME, DB_USER, and DB_PASSWORD.
Enter your new WordPress blog’s database name, username and password between the ‘ ‘. Look at the 13th image in this article above just below where I said “You should get a confirmation telling you that the user has been successfully added to the database”. That was my new WordPress database and username that I created. The 10th image in this article is where I created the user’s password.
This IS NOT your WordPress admin username and password! This is your database’s name and password which you just created for your new host/server.

Once you enter the new information, save the updated “wp-config.php” file.
You’re done!
You can now go to your new WordPress blog’s URL admin login (i.e. example.com/wp-admin) and login using the same username and password you were using on your original WordPress blog.

That’s about as simple as I can explain the process of moving your WordPress blog to a new server or host. If you have any problems, feel free to post your comment below and we can all do our best to help you along.
Popularity: 85% [?]
















Free Online Tutorials



Awesome info!! I’m glad I’ll know what to do if it ever comes time to moving my blog!
Now that’s what I call clear instructions… I have one question tho… on the WordPress site instructions for backing up the database, it says to:
* Ensure that SQL is checked!
# The SQL section
Tick the following boxes:
* ‘Structure’
* ‘Add DROP TABLE’
* ‘Add AUTO_INCREMENT’ and
* ‘Enclose table and field names with backquotes’
# The DATA section
Leave the boxes inside this section unticked, but make sure to keep the checkbox next to the “DATA” heading checked.
And then “SAVE” the file… I’m assuming we do the same in this case also? Just want to make sure I got it right…
The Options part is where I think most people get lost along with forgetting to update the Config file… I know I did… LOL…
Thanx for the quick response and detailed info… I’ll be printing this out just to make sure I don’t forget something and screw things up in the future…
GREAT JOB!
@ Linda:
Thanks for the kind remarks. I suppose I didn’t even think about that part because it should be checked by default. Here’s what I have checked:
STRUCTURE
- Add IF NOT EXISTS
- Add AUTO INCREMENT value
- Enclose table and field names with backquotes
DATA
- Complete Inserts
- Extend Inserts
Maximal length of created query = 50000
- Use hexadecimal for BLOB
- Export type: INSERT
That should about do it!
P.S. – You dont need the “drop table” option unless you’re overwriting an old database. That option would automatically delete all your old tables and then import the saved ones.
If it’s a new database, you don’t need it but it can’t hurt either.
- John
[...] View post [...]
[...] more from the original source: How To Move WordPress To A New Server Or Host | JWRmedia.com This entry was posted on Friday, December 26th, 2008 and is filed under WordPress Hosting. You [...]
Great tips! If you have editplus, you can edit all the urls in one quick swift change before uploading onto the new database.
Susan,
Thanks for referring to editplus. I was unfamiliar with it. I’ll have to review it for myself and maybe post something about it here in the near future.
Hey John,
Excellent post. Finally something that is not a copy-paste of the same two tutorials on the net.
I am attempting to follow this guide now, moving my localhost wordpress online.
I am worried that some URLs will need to be changed, but I hope I will be able to edit all through the wordpress interface, and without the need to dig into the database tables.
Thanks for this nice post.
Danny,
Thanks for the comments. You will need to update the URL in the database, otherwise when you attempt to login to your admin panel, it will redirect you to the old URL.
Unfortunately, there is no way around this. Other than updating the tables in the database that I’ve outlined in the tutorial, you won’t need to make any other changes to the database manually.
Oh, no no – I have no problems at all going into phpMyAdmin and editing stuff – as long as I know what I need to update…
I already implemented your guide to the letter, in regards to editing the three database entries, I just hope I will not bump into MORE things that I need to update – you know, things that would still go to “localhost”.
I think it is totally a missing feature in wordpress – I was very disappointed to see that the Export feature is not exporting everything, including file structure and plugins etc.
I mean, one would expect that many people would like to keep their site locally, on localhost, do the editing there, and just “sync” it with the online site.
Anyways.
[...] at: HELP: How do I transfer a WordPress Blog to another server without losing post and data? and How To Move WordPress To A New Server Or Host | JWRmedia.com [...]
Excellent tutorial!! (the ‘myPHPAdmin’ screengrabs are very re-assuring!)
Just transfered a site using it and have only two things to add that may be relevant:
1) May be obvious but the first place to look if you get an error upon finishing the process is your config file. Make sure the database, username and password are dientical to the details you used to set up the database in MySQL. (i.e. no room for a dash instead of an underscore. *ahem*)
2) You can avoid modifying the urls in the database tables after you import. —- After backing up your original wp database go back into wordpress and change the domain urls (under settings/options) to your new url. Then back up the database again (dont replace the last one just to be on the safe side) and import this database into your new mySQL database.
thanks again!
@ smalldifferences:
Thanks for the comment. The only thing is with step #2, if you don’t modify the URL in phpmyadming, when you attempt to visit the new blog’s URL it will usually redirect you to the old URL.
Nice post. I am also trying to help other webmasters with advices and tips like yours.Keep up the good job!!
Just what I’ve been looking for as I’m about to try to move a blog to a new domain name. Have a question though.
Is it ok to create the new database on the new domain using Fantastico? I believe that creates the new database plus all the WP files. Then would I be able to just copy over the old files from my old domain?
THanks
@Jay:
If you use Fantastico, the only files you would have to copy from your old host are your theme and plugin files. You would then have to import the old database to the new one.
You can run into a lot of problems with Fantastico when you’re not starting from scratch, however. For one, the version of WordPress that Fantastico installs can be different than the version you were using.
I’ve never been a fan of Fantastico. If you’re going to be moving files anyway, you might as well move them all. Moving only some or all of them requires no additional skill on your part.
Thanks John. I’ll most likely move them as per your instructions. They’re very well laid out. Once I move one, any others should be a breeze. Just want to move the files to a new domain on the same host.
John,
Everything went smoothly until I changed my wp-config.php file then I got “Error establishing a database connection” I double checked my database name, user name and password and it’s correct from what I can tell.
Any suggestions?
@ Jay:
Double check your database name and username. Note that the actual name you assign for each comes after your hosting account username and an underscore.
For example, if I had the database name “newdatabase”, the complete database name may be “jrivnet_newdatabase”. (See the last screenshot above)
Lastly, be sure you don’t forget to add the user you created to the database with all permissions. (See the 11th and 12th pictures of the tutorial above)
Yep, I checked those. I have my hostingaccount_id format.
Don’t ask me why but I figured I try deleting the username and just assigning it again to the database and it works now.
I have no clue what I would have done without you. You rock!
Thank you so much for the tutorial!
I’ve just moved my blog to a new server using it.
Excellent tutorial, very well explained and easy to understand.
I have never done the wordpress site transfer and it was my first attempt when I transferred a wordpress site following this tutorial. It has transferred successfully but not showing the content.
I am sure it must be my mistake somewhere, I will get it fixed.
Thank you very much for writing this great tutorial.
In my case I needed to do one additional step.
It is unclear which encoding phpMyAdmin uses to export databases – utf8, etc..
However it should be properly selected while importing otherwise results will be unpredictable (in my case posts were imported only partially despite of phpMyAdmin says everything is ok).
I solved this puzzle by converting exported database to utf8 encoding manually by Notepad++ and by selecting utf8 on import stage.
is it still possible to transfer my site to other host when it is already down?.
@ Robert:
Yes it is as long as you have a backup copy of your files and database.
Thank you very much for writing this great tutorial.
Thank you SO much for this! To prevent too much downtime, I’m totally redoing my site using WordPress as a CMS on my localhost, and uploading it to the new server was one of those head-scratchers. Your instructions made it so much more clear! Kudos!
hi there,
thanks for a detailed steps-by-steps guide. it’s really helpful. however, after completing all the steps, I was prompted with this error.
seeking your assistance
Fatal error: Call to undefined function get_option() in /home/kembaram/public_html/wp-admin/admin.php on line 21
FINALLY! I have been pulling my hair out, scouring the internet, creating and deleting databases, dumping records, exporting and importing – all to no avail for over 4 hours. Then lo and behold I find your tutorial. THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU!
’nuff said!
Thank you very much for writing this great tutorial.
Thank you very much for writing this clear tutorial. I did everything except for create a new SQL db. This is what I did.
1. download another different domain name on another host WP SQL db and WPHome.tar file.
2. upload these files to a new host/ new domain name
3. added files to existing db as the db had no posts other than hello post, so a blog was already installed with db using fantastico.
4. replaced URL names on wp_posts to new URL name
5. Followed your instructions above (except creating a new db)
6. couldn’t remember my existing db pswd (arrghhh)
7. tried to change wp sql db user password following instructions at
http://codex.wordpress.org/Resetting_Your_Password changed successfully
but still can not login into examplesite.com/wp-admin or examplesite.com/wp-login.php
I get this error
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct hostname?
* Are you sure that the database server is running?
Any ideas on how to change a WP SQL user password ?
Lisa
Lisa
To change the WordPress password through the database, you need to login to your phpmyadmin panel.
1. Find your wordpress database and select it
2. Find table wp_users
3. Click on the user table link
4. Then find and click on Browse
5. Find the user for whom you want to edit the password and click on the the pencil image next to the red X.
6. Now you need to use a MD5 password and not plain text. So go to http://pajhome.org.uk/crypt/md5/ and convert your plain text password to MD5.
7. Copy and paste your MD5 password in the place of the old one in phpmyadmin
8. Save the password and that should do the trick
If you are still having trouble, let me know
Hello George-
Thank you for your tip, I did change my password.
I was able to navigate to my site.
Got a 404 when I logged with site.com/wp-admin
when I logged in with site.com/wp-login.php
I got a login screen with following error
in the “username” field this was autopopulated “<br” characters
in the place where password box is normally, this is what it
stated.
Fatal error: Call to undefined function esc_attr() in /home/netgurl1/public_html/wp-login.php on line 505
I don’t know php so when I checked the source wp-login.php file I could not determine what would be required to fix this?
Lisa
Lisa it seems to me that wordpress is not properly installed
[...] Update Your Config File. I had to do this a few months back. I found this guide and followed it exactly and it worked. Here’s the link: How To Move WordPress To A New Server Or Host | JWRmedia.com [...]
These are the best I found by far….thanks so very much!
[...] the original post: How To Move WordPress To A New Server Or Host | JWRmedia.com Tags: server Comments0 Leave a Reply Click here to cancel [...]
[...] able to successfully transfer our WordPress blog from GoDaddy by following a great tutorial found here. The PHPmyAdmin stuff wasn’t hard at all to follow and execute. Many thanks to JWR Media for [...]
Thank you for a wonderful tutorial. I’ve read every tutorial I could find and non come close to providing the well detailed information that you have provided.
I do have one question, hoping you could answer.
Everything looks to have transfered perfectly with the exception being of my content as it is not showing up. Any idea why this may be? Thanks!
Thanks to this tutorial, I’ve been moving sites left and right with no problem. Today however, once I change my config.php file I get a fatal error:
Fatal error: Call to undefined function wp() in /home/myid/public_html/mydomain.com/wp-blog-header.php on line 14
Any suggestions? I’ve checked and double checked my config file to make sure I have the right database name, user and password. If I use the old sites config file the site comes up under the new url but then of course any links take me to the old site.
Thanks
Nevermind. Finally got it fixed. I deleted the user and re-added it to the database. That worked so perhaps the user creation got corrupt or password wasn’t good.
hi plerase can you help,
Have moved my website to a new server and domain.
Followed simple instructions but still no joy, my website appears but without any of the styling or template.
THe admin panel doesn’t appear at all, says ‘ sorry could not find site windowstoptips.com, but the admin is http://www.windowstoptips.com/wp-admin
can you give me an idea as to where i have gone wrong?
would really appreciate the help.
thanks
Thanks for sharing good information, i learn how to move wordpress here.
Keep posting.
David
Great post! I don’t know what I would have done without your help! Thanks!
I can’t believe it worked!
Well it had to be done and I didn’t have a clue. Watched several YouTube videos and still confused.
In the end I printed this out and just went through it step by step.
Refreshed the screen thinking no way, and up my blog popped.
You see even a Carpet Cleaner can do it!
Thanks very much for your article.
Mike
Thx bro, u saved me a hack a lot of trouble.
Thank you for your detailed instructions, I am still currently working on my site but your step-by-step really helped me get my blog off a local wampserver install and up onto hostgator.
Much appreciated!