Wordpress How-To : Exporting / Importing a Wordpress Database

Posted on Jul 3, 2009 in Wordpress
Wordpress How-To : Exporting / Importing a Wordpress Database

When working on a project , I usually install Wordpress on my local server (WAMP on a PC) and after I’m done developing the theme , I export the database to the client’s server.This is a pretty easy process and this is how you do it.

1. Exporting the database – Phpmyadmin

Enter Phpmyadmin and select your database.

Select the Export tab

Tick Add DROP TABLE/VIEW/PROCEDURE/FUNCTION . Make sure all the tables and SQL are selected . Tick “Save as file” . Click “GO” and you’re done with the first part.

Open the file (*.sql) with Notepad (or any other text editor) . Replace all local URLs ( http://localhost ) with you new domain name (e.g. http://www.mysite.com ). After you’re done , save the file.

2. Upload the Wordpress folder to your server

3. Importing the database

Log in to Phpmyadmin on your server and select the Import Tab. Click Browse , select the database file (*.sql) from your HDD and click GO.

4. Changing WP Settings

Edit wp-config.php and change these following lines.

Done.

Problems you may encounter .

One problem I found after I imported the database was that I couldn’t upload images from the Dashboard to the “Upload” folder. To solve this , log in to phpmyadmin on your server. Select the newly imported database .
Select the wp_options table and click Browse.

Search for the option_name called upload_path (I found it on the second page)

Select it and click Change (the little Pencil icon)

Enter the Full path to your “Uploads” folder and click GO.

And you’re done.

Enjoyed this post ? Subscribe and Share

  • RSS Feed
  • Get Email Updates
  • Digg
  • Del.icio.us
  • StumbleUpon
  • DesignFloat
  • Reddit

Leave a Comment