Friday, February 10, 2006

Moving database between sites

Now I have created a new site then I have to move the database from My EMBA to there.

I have done a successful rehearsal here, details are in this post. I repeated the steps there, to my surprise it didn't work?!!!

I then changed plan, here are the successful "Plan B"

  1. use Lester's WP-DBMANAGER instead of skipper's to backup the database from the old site

  2. download the gz file off-site

  3. the gz backup is prefixed with a date code, write that 10 digits figure down

  4. unzipped the backup then change url reference to match the new site

  5. the database file name reference in the file should also be changed to match the new site. Am not sure if this is required but no harm doing this

  6. rename the sql file such that it has the same 10 digits prefix, e.g. xxxxxxxxxx_-_databasefilename.sql

  7. the databasefilename should be the same as the database file name of your new site

  8. upload the sql file to the wp-backup-db folder of your new site

  9. Good luck, click restore button

It's advisable that your new site has the same theme, same plugins activated before the restoration of database. This is what I did.

You probably couldn't login after restoration unless your login name and password are the same for both sites. You may get "session expired" message then you'll have to load the login page again.

1 comment:

  1. [...] Export content from old site into an RSS xml file. Lester’s WP-dbManager didn’t work this time. I followed exactly my experience here and made few attempts last night. There are only 50 posts so I used RSS import instead. The bad things are lost of categories, comments and post view statistics. [...]