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.
Exporting Problem at PhpMyAdmin
I got this problem after click the GO button:
export.php: Missing parameter: what (FAQ 2.8)
export.php: Missing parameter: export_type (FAQ 2.8)
Please kindly explain how to solve this problem?
Please email your answer to Andrew_CB2100@Hotmail.Com
I’m struggling through this series and have just come to this tutorial. Perhaps I should know how but…
“Login to your server cPanel, go to MySQL Databases, create a new database and assign a user.”
Is a bit much for me.
I’ve checked out a few C panel / WordPress tutorials and I’m not giving up.
I appreciate your time and effort, but this one may be too complicated for me
Wish me luck
Keith D
thanks for this great tutorial! i really had some problems regarding the exporting of the database. its a good thing that i have some knowledge with database manipulation.
and also many thanks for this post again! =)
its a good thing that i have some knowledge with database manipulation.
…
..
Thanks for this great tutorial!.
First of all, your web site so beautiful and thank you for a good article.
Very affective process.
thanks for your good article
Finaly a clear and simple tutorial on how to export a local database.After pulling out my hairs the last two day searching for a tutorial that is easy to use i`m praying on my knees to thank God my database is finaly up and running and its just so simple.Wordpress should implement this tutorial in theyr codex!Thanks a bunch.
I am having the same problem as Mindy. My error reads: ##1044 – Access denied for user ‘mark’@’10.%’ to database ‘information_schema’ .
Do you know how to fix this? I already have WordPress uploaded on my host server which may be the problem. However, I would like to do this without reinstalling it. Any suggestions?
thank you for this tutorial..very helpful
This tutorial is great! I was worried that exporting the database and importing to the new host wouldn’t include all of the pages, comments, etc. I was afraid I would have to export the XML within WordPress as well. But that wouldn’t work because the exported XML file was too large (over 2MB) to import to the new host. So I’ll give this a shot. Thanks again!
these are awesome!
thanks for putting in the effort to get this list together http://www.cennet.gen.tr
Very clear directions. Thank you!
FYI for other readers:
A nice program to use instead of phpmyadmin is “Sequel Pro” for Mac OSX.
You saved my blog! I needed the export settings to make .sql file – (moving blog after it went down with no backup).
THANKS!
Finaly a clear and simple tutorial on how to export a local database.
Overall a good tutorial, I see many are pleased with it. However, partially I find it hard to follow and actually the whole procedure didn’t work for me. Looking for a solution at the moment.
Hi, This tutorial is good to help me more to do it.
And I have one problem after I exported database then I explored it. It display two lines errow in .sql file
export.php: Missing parameter: what (FAQ 2.8) export.php: Missing parameter: export_type (FAQ 2.8)
does anyone know what I’m doing wrong?
Thanks
thank you for this tutorial..very helpful.. I learn
Great , Exporting and Importing WordPress
Great article. CSS saved web design
Cyrus
Visit http://www.psdtoxhtmlcoder.com
Hi Nick,
It is much easier to go to the wordpress-admin panel -> tools -> export.
The file which is created that way can be imported at the new site (admin -> tools -> import)with an existing installation. (It is advisable to delete all the pre-generated categories, posts and replies).