Nov 21

Tagged in: Comments:Add

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

export database

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").

export database

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.

export database

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.

export database

6. Done

Go to your website and everything should work perfect.

Delicious Stumbleupon Digg

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)

  • 109 Mark

    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.

    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

    thanks for your good article

  • 106 Search24online SEO Services http://www.search24online.com

    Very affective process.

  • 105 Watin http://photomag-review.blogspot.com

    First of all, your web site so beautiful and thank you for a good article.

  • 104 wpdigger http://www.wpdigger.com/wordpress-tutorials

    its a good thing that i have some knowledge with database manipulation.

    ..
    Thanks for this great tutorial!.

  • 103 ben

    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

    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

    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

    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

Pages: 11 10 9 8 7 6 5 4 3 2 1 » Show All

Post Your Comments

(required)

(required)

Comment Guidelines

  • Please keep comments related to topic. And be nice, don't spam!
  • Basic HTML tags are allowed:
    <a href> <abbr> <acronym> <blockquote> <code> <em> <strike> <strong>
  • Note: un-related or spam comments will be deleted.

Live Comment Preview

advertisement

Back to top