Nov 21
Exporting and Importing WordPress
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.
Building Custom WordPress Theme Best of CSS Design 2008
Comments
Pages: 11 10 9 8 7 6 5 4 3 2 1 » Show All
There are 109 comments (+Add)
Pages: 11 10 9 8 7 6 5 4 3 2 1 » Show All











109 Mark
June 30th, 2009 at 4:31 pm
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?
108 A.S.
June 10th, 2009 at 7:39 pm
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.
107 unisa81 http://www.unisa81.com
June 9th, 2009 at 2:11 am
thanks for your good article
106 Search24online SEO Services http://www.search24online.com
June 4th, 2009 at 12:47 pm
Very affective process.
105 Watin http://photomag-review.blogspot.com
June 1st, 2009 at 12:53 am
First of all, your web site so beautiful and thank you for a good article.
104 wpdigger http://www.wpdigger.com/wordpress-tutorials
May 27th, 2009 at 2:12 am
its a good thing that i have some knowledge with database manipulation.
…
..
Thanks for this great tutorial!.
103 ben
May 22nd, 2009 at 9:40 pm
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! =)
102 Keith D http://www.wmwebdesign.co.uk
May 19th, 2009 at 2:34 pm
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
101 andrew
May 13th, 2009 at 6:35 am
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
100 Adam Kiu http://adamkiu.com
May 5th, 2009 at 5:17 pm
Hi,
Thanks a lot for this - I was able to export/import my Wordpress but at first my images weren’t being uploaded to the right place (I use Windows Live Writer)
The problem was that in my .sql file, the ‘upload_path’ was hardcoded to ‘xampp/htdocs/wp-content/uploads’, which lead to my images being uploaded to the wrong place. I had to replace this with my siteurl (which was not detected when I did a localhost find and replace) to get it working.
It cost me a day in coding so I’m hoping that I can help shed some light on those who come across the same problem.
Excellent tutorial though!
Cheers,
Adam