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


144 LouienatoR
March 14th, 2010 at 9:04 pm
why does my jquerry won’t appear in my page???? and my wordpress page is all messed up…. need help very badly…. thank you…..
143 Tim http://www.tim-specht.de
March 1st, 2010 at 2:06 am
Hej there,
thanks for those three very helpful tutorials,I transfered my local WordPress installation using this, so it worked quite fine for me. Perhaps you should recommend using a MySQl 5.0 database when you are setting up your domain in the hosts portal, that’s the only issue I had to deal with.
So far
142 Web Design http://www.dzinerfusion.com
February 27th, 2010 at 9:38 pm
Thanks for this guide. It will help me transfer my post from blogger, as xml files are much eaasier and the only way from blogger to wordpress!
141 Clyde Sanchez
February 22nd, 2010 at 11:26 am
Hi everyone,
I just wanted to let the users who are having the 404 issue after performing the export/import that it takes a few minutes for the data to propagate.
Give it 10 minutes or so and the links should work properly. I was worried after performing the above steps, but after a few minutes the 404 issue went away…hope this helps.
140 dwhip http://www.davidwhipps.com
February 11th, 2010 at 7:21 pm
Great article (as usual) - but I’m finding that if you setup a WP site in MAMP that it still sees the htdocs folder as the ‘root’ of the site and not the actual site folder itself. Is there a way around this so you don’t have to make adjustments from the live version of the site in terms of relative linkage?
139 Ada Werrek
February 10th, 2010 at 3:38 pm
Thank you for a great tutorials, very handy and useful. I use one database for localhost and website, so I don’t have to export/import my database. Less work is better
138 Graphist http://animators.ir
January 22nd, 2010 at 8:39 am
your website theme is very beautiful.
thanks for content.
137 slim http://qtemplate.org
January 11th, 2010 at 4:47 pm
喜欢你们的设计与技术. thanks
136 online stock trading advice http://community.bsu.edu/members/Online_Stock_Trading.asp
January 10th, 2010 at 6:39 pm
I don’t usually reply to posts but I will in this case, great info…I will add a backlink and bookmark your site. Keep up the good work!
I’m Out!
135 vincentdresses http://www.hibridal.com
January 6th, 2010 at 1:41 am
喜欢你们的设计与技术,常来看看