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: 17 16 15 14 13 12 11 10 9 8 71 » Show All

There are 170 comments (+Add)

  • 170 Alok http://www.thealok.com

    Working Bro thanks!

  • 169 Alicia http://alicia@intrepidrealist.com

    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

    asasa

  • 167 Shahid http://shahidkamal.com

    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/

    I was worrying if this is so simple.
    But you rocks..
    Great Tutorial
    Cheers…

  • 165 Vinayagam

    Hello Guys,

    Thanks for the info,it’s very useful for me.

    Keep rocking…

  • 164 host http://www.freehostingtips.com

    nice! I am so happy I found this…helped us a lot. thanks guys!

  • 163 stage-drama http://www.stage-drama.com

    this post is really helpfull regarding import & export in wordpress

  • 162 Drew http://www.edwinblue.com

    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

    Thanx for the toturial. It`s work

Pages: 17 16 15 14 13 12 11 10 9 8 71 » 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

Back to top