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: 17 16 15 14 13 12 11 10 9 8 7 … 1 » Show All
There are 170 comments (+Add)
Pages: 17 16 15 14 13 12 11 10 9 8 7 … 1 » Show All


170 Alok http://www.thealok.com
August 21st, 2010 at 11:17 am
Working Bro thanks!
169 Alicia http://alicia@intrepidrealist.com
August 11th, 2010 at 9:09 pm
Thanks for the simple suggestion of changing URL in SQL file. I’ve been doing a query in phpMyAdmin.
This tutorial rocks. Thank you so much!
168 dsas http://asas
August 10th, 2010 at 7:18 pm
asasa
167 Shahid http://shahidkamal.com
July 25th, 2010 at 1:50 pm
Excellent tutorial. Easy to follow, complete and very useful.
A quick question. Let’s say I continue to modify the local environment, would it be a simple matter of following all the database export/import steps again to re-incorporate?
(I’m not going to be complicating things by continuing to modify the database in the target, testing environment)
Thanks again!
166 WebVeins http://www.ewebveins.com/
July 22nd, 2010 at 2:26 am
I was worrying if this is so simple.
But you rocks..
Great Tutorial
Cheers…
165 Vinayagam
July 22nd, 2010 at 12:51 am
Hello Guys,
Thanks for the info,it’s very useful for me.
Keep rocking…
164 host http://www.freehostingtips.com
July 21st, 2010 at 1:53 pm
nice! I am so happy I found this…helped us a lot. thanks guys!
163 stage-drama http://www.stage-drama.com
July 8th, 2010 at 10:37 am
this post is really helpfull regarding import & export in wordpress
162 Drew http://www.edwinblue.com
June 30th, 2010 at 1:51 am
Hi!
Thanks so much for all the help! This tutorial is the best I’ve seen.
However, I have one hang-up. I went through the steps and now when I try to access mydomain (www.edwinblue.com) the “:8888/” gets added into the address and the site won’t load.
Possible Issues:
When I setup my MAMP server I just made it “http://localhost:8888/” I didn’t include “mysite”
When I went to update my wp-config file it appeared that all the settings were already correct. ??
Lastly when you say upload the entire “wordpress” folder is that the same as the “wp-content” folder?
Someone PLEASE PLEASE PLEASE help!
Thanks in advance,
Drew
161 Rinze van der Hoop http://www.xcomputers.nl
June 25th, 2010 at 2:30 pm
Thanx for the toturial. It`s work