Database Install - Restore the database only

Restore only the database from a backup, leaving the current site files untouched.

SL MigrationsUpdated 21 Oct 2026
restoredatabase

Database Install

Use this when you only want to restore the database and leave the files untouched (because the files are already synced through rsync, git or some other way).

Common scenarios

  • The current database is corrupt but the files are fine
  • You have rsynced the files from staging to production and only need to sync the database
  • You are testing a data migration without wanting to affect the files

How to do it

1. Back up the current database

Make a copy of the current database before overwriting it. Most hosting providers offer a tool for this in cPanel/Plesk, or use mysqldump if you have SSH.

2. Upload the installer + archive

Upload them to the wp-content/backups-slm/ folder of the running site.

3. Run the installer in "Database Only" mode

Open installer.php in your browser. In step 1, choose Install Database Only in the deployment mode dropdown.

The installer skips the file extraction step and only runs:

  • Drop existing tables
  • Import SQL dump
  • Search & replace URL

4. Verify

  • Log in to wp-admin
  • Check Posts, Settings and Options
  • The Plugin/Theme lists stay the same (the files are not touched)

Warnings

  • Plugin version mismatch: if a plugin version recorded in the database differs from the version of the files on the site, it can cause errors. Back up the plugins first.
  • Custom tables: the SQL dump only contains tables with the table_prefix set in wp-config.php. Custom tables outside that prefix will NOT be dumped.

See also