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.

1 Answer 1


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

  • 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
    Commented Jul 19, 2011 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
    Commented Jul 19, 2011 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. Commented Jul 19, 2011 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
    Commented Jul 19, 2011 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. Commented Jul 19, 2011 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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