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.
Thanks for the easy to undersand report. You have answered all my questions and save me a lot of time wondering what to do.
I have one more question: if you move from one hosting (Godaddy) to another, how to preserve the mailbox e-mails and move them later on to the new mailbox with the same name?
Thanks for the easy to undersand report. You have answered all my questions and save me a lot of time wondering what to do.
I have one more question: if you move from one hosting (Godaddy) to another, how to preserve the mailbox e-mails and move them later on to the new mailbox with the same name?
hey thanks for this :) made a development site switch a lot easier!
Thank you so much for this easy tutorial, and for sharing your knowledge, it saved me.
I’m a first time MAMP user (and first time WP user) and this made getting my site live, not quite a breeze, but definitely do-able.
i just want to ask… on step 4, “Upload the entire WordPress folder to your server” how do you upload the whole WordPress folder through phpmyadmin? Need help on that…
Anyway,
Thank you!
Not through phpadmin, but via your FTP client, or file upload on your server’s control panel. :)
Upload the entire WordPress folder to your server” how do you upload the whole WordPress folder through phpmyadmin? Need help on that…
Not through phpadmin, but via your FTP client, or file upload on your server’s control panel.
i have followed these instrucitons (skipped the custom template since i am using a purchased templagte) but my phpMyAdmin screens look different than yours and i can’t follow them since things are not the same. for example:
OK -Under the Export field, make sure all tables are selected
NO – THIS IS UNDER THE OPERATIONS TAB- Under the Structure field, tick “Add DROP TABLE / DROP VIEW”
NO DROP TAB, its under the export tab and then i have to toggle the custom field Tick “Save as File”
Then click Go and it will prompt you to download a SQL file
ok…then i go to the next set of instructions and import the data base and of course it shows me ERROR…can’t go any further. i have done this 500 x…..
can you help me?
MAMP version 2.1.1
Mac OSX 10.6.8
this is the error:
Error
SQL query:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
–
– Database: `ftcWP_0915`
–
CREATE DATABASE `ftcWP_0915` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
MySQL said: Documentation
#1044 – Access denied for user ‘rburns’@’10.%’ to database ‘ftcWP_0915′
Thank you so much! This is the best manual on the net. Much better than worpdpress’ manual itself and better than my hosting company’s site, and that’s supposed to be their job. I use this manual with any new site i build, juts to make sure i do everything right.
For those asking how to transfer the files, best option is the use the free ftp software FileZilla. It’s all drag and drop and never does any problems in copying files from your computer to the storage server. The configuration details you can get from your tech support of the storage site.
Thnx again!
sasha
how to extract wordpress file in html.not xml please solve my problem….
Lots of Confusion as a Newbie But this time Got An Idea
Thanks Admin