In the last two chapters, I talked about Installing WordPress Locally and Building Custom WordPress Theme. This chapter will cover exporting your local WordPress to a web host. Assume you are done with the local WordPress development, it is time to learn how to export and import WordPress. Then you can keep the local version for backup purpose and future development (ie. testing new themes, plugins, and upgrades).
1. Export Local Database
Login to your local phpMyAdmin, select the database from the dropdown. Click on the Export tab:
- Under the Export field, make sure all tables are selected
- Under the Structure field, tick "Add DROP TABLE / DROP VIEW"
- Tick "Save as File"
- Then click Go and it will prompt you to download a SQL file

2. Find & Replace All Local URLs
Open the database SQL file with a text editor. Find and replace all local URLs with your domain URL (eg. replace all "http://localhost:8888/mysite" with "http://www.yourdomain.com").

3. Import The Database
Login to your server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go.

4. Upload WordPress
Upload the entire WordPress folder to your server.
5. Change The wp-config.php Setting
On your server, open the wp-config.php file. Change the database details to reflect your server settings.

6. Done
Go to your website and everything should work perfect.
Man It solved my Problem.. Thanks
This has got to be the best tutorial out there…simple and to the point. Thank you, Nick for creating this. I’ve referenced to this post several times to make sure I do it the right way.
if i read this one before it will save me from hell
Thank You, :D
AM currently trying to create a local word press. anyways i have intentions of making it live. i installed XAMP and have installed word press. its working great locally. i want to add more stuff on it still though. well i want to know how to make it live and i want to host it myself. am not exactly a newbie to wordpress but i have never made any webpage or site live. i need help making my wordpress live. am googling some info and ama attempt some of them.
Thanks so much for the great tutorial! Worked perfectly, although with GoDaddy I had to change the host name to what GoDaddy was providing. Other than that, perfect!
i need help making my wordpress live. am googling some info and ama attempt some of them.
I am getting error code 1046 while importing MySQL database. Please help me to escape out of this error.
It’s nice tutorial, but i think better\easier way is to export xml file from wp dashboard, and to import it to new host like it’s described here…
http://wordpress.org/support/topic/using-importexport-when-moving-wordpress-to-a-new-host
Thanks! It’s very useful, but I don’t understand: if I want to export my local WordPress into WordPress.com, how can I do that? Do I need to put the local WordPress folder into the export/import section? It’s said it only works for comments, posts, etc..
Thanks.
hello there
it was the best tutorial i found out to import my wordpress site from older to newer one. i am still confused and did not be able to do what i wanted to do so. i have old site using all the same version of wordpress with all the plugins installed in new one, tried to import mysql using phpmyadmin but give me duplicate posts and error which ended in failure to import all my data. i replaced all my old domain name in the imported sql file using text editor as well and data base too changed. i will try again and may ask you fine people for help.
Thanks for nice post.