WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to restore a Wordpress blog from a backup. Unfortunately, all I have is an SQL dump of the database as generated by phpMyAdmin. The dump was created when the blog was running Wordpress 2.9/2.9.1/2.9.2. The new blog is a brand-new installation of Wordpress 3.2.1.

How can I import the contents of the SQL dump into the new Wordpress installation?

I tried importing the dump into the database using phpMyAdmin before installing Wordpress, but then install.php tells me that Wordpress seems to be already installed and that I should delete the database tables.

share|improve this question
up vote 4 down vote accepted

If it is an older version of WP, you need to find out what version of WP generated the database, as WP upgrades the DB most times the files are upgraded and you should incrementally upgrade to also upgrade the database.

Look in the wp_options table for option 711 and see what the version is; option name will be site_transient_update_core and the value will be the download link, i.e. http://wordpress.org/wordpress-3.2.1.zip which means the version is 3.2.1

Find the version and leave a comment below.

Depending on the age of the version, you need to do manual, incremental upgrades to get to at least 3.0 where you can use auto-update.

If you import/move a DB, no need to run install.php. Just upload all WP files and folders. See Moving WordPress « WordPress Codex

share|improve this answer
Thanks for the quick answer. The wp_options table does not seem to contain a row where option_id=711. Unfortunately, I do not have the files of the old WP installation, just that SQL dump. – dtb Jul 19 '11 at 17:23
I've just found this row: option_id=58 option_name=db_version option_value=12329 According to FAQ Installation this seems to indicate a Wordpress 2.9/2.9.1/2.9.2 installation. – dtb Jul 19 '11 at 17:31
Ok, then you can probably do a auto-update to 3.2, but maybe best to go to 3 manually. Load the 2.9 files from wordpress.org/download/release-archive to start. – markratledge Jul 19 '11 at 17:52
Just to double-check: I install 2.9, then delete the tables, import the SQL dump and let it auto-update to 3.2? – dtb Jul 19 '11 at 17:57
No. Make a new database in phpmyadmin, import dump. Add the new DB details - name, user, password, localhost - in wp-config.php. Simply upload WP2.9 files and folders; don't run install. – markratledge Jul 19 '11 at 18:06

It might work to satisfaction to run the dump file on top of the new 3.0+ database. I doubt it would harm anything and probably would populate the posts & meta taxonomy (categories and tags) tables as I don't think they had much difference between the two versions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.