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 ! it worked great…. I only lost maps I did with mappress plugin…
All the best
Hi!
Thanks for making a tutorial. I have followed your instructions and I have more or less transported my wordpress from one domain to another domain on the same host server. The home page loads without problem. (I only lost the about information)
However I have other more pressing problems. I keep getting this error message every time when I want to access individual pages or posts such as http://www.villmarksporten.no/kennel:
404 Not Found
The requested URL /kennel does not exist
In WP admin I see all the posts and pages. But somehow the database has not constructed the pages in the process.
Anyone have any idea what is going on and tip how I can solve it?
If I use keywords and the search button I get the posts or page. For instance if I search for oppdrett, a key word I know is located on the “kennel page” I have more luck and I found this entry:
http://www.villmarksporten.no/?s=Villmarksportens+oppdrett give me the page. But it seems like MySQL has not made entries for the permalinks that can be seen inside Wp admin.
I hope I am able to make myself clear.
Thanks!
Thank you for your easy to follow articles on WordPress. Installing and building themes was simple due to your excellent instructions. Thank you VERY much.
Thanks ! it worked great…. Come On
Overall a good tutorial
good it works
I followed your instructions and everything went well (so thanks very much!) except for one problem that I solved myself, so you should add another step to do before uploading the wordpress folder via ftp:
in case someone has set up permalinks, the .htaccess file has to be modified.
great!!!
Thanks for sharing. Helped a lot.
excellent help these articles. Created a wordpress theme and went from local to live based on these articles.
nice tutorial i will translate my language
There’s no widgets in the GlossyBlue theme. Bummer.
great job bro thanks
Great info but my needs are simpler.Can you explain the basics of merely exporting a theme from ne of my existing blogs to my harddrive. I just want to be able to upload that same theme again and again. Thanks.
Andrew
Coffs Harbour Australia
喜欢你们的设计与技术,常来看看
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! :)
喜欢你们的设计与技术. thanks
your website theme is very beautiful.
thanks for content.
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 :)
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?