Documentation

Importing an SQL Export or Backup File

Importing via WP Migrate DB Pro’s Import Feature

To import an SQL file

WP Migrate DB Pro Versions 2.0+

  1. Click on the Import Database button on the “Migrate” tab
  2. Select an SQL export file to upload and import
  3. In the “Backup the database before running the import” panel, you can select whether to back up the local database or no (defaults to “No backup”)
  4. In the “Advanced Options” panel, check the “Do not import the ‘active_plugins’ setting” checkbox to preserve the currently active plugins on the site
  5. The default Search and Replace fields are automatically populated for you.
  6. Click the “Import Database” button

WP Migrate DB Pro Versions 1.8 to 1.9

  1. Click on the Import radio button on the “Migrate” tab
  2. Select an SQL export file to upload and import
  3. If you would like to run a find and replace on the imported SQL, check the ‘Run a find & replace on the import’ checkbox and fill in the replacement values
  4. Optionally select the ‘Backup the database before running the import’ checkbox to backup the current database before running the import
  5. Check the ‘Do not import the “active plugins” setting’ checkbox to preserve the currently active plugins on the site
  6. Click the ‘Import’ button

WP Migrate DB Pro Versions 1.4 to 1.7.2

When you use the Export or Backup feature of WP Migrate DB Pro, it creates a file with the .sql file extension. However, there is no feature currently built into WP Migrate DB Pro to import that file.

Importing via phpMyAdmin

  • Log in to phpMyAdmin
  • Select an existing database or create a new empty database
  • Click the Import tab
  • Click the Browse button
  • Locate the file to be imported
  • Click Open or OK
  • Configure any additional optional import settings (optional)
  • Click Go

Your SQL file will now be imported. This process is usually swift but may take a few minutes if your SQL file is large.

Importing via Command Line

If your SQL file is huge, it’s possible that phpMyAdmin will time out. If that’s the case, you will need to import your SQL file via the command line using a command similar to the following:

/path/to/mysql -h localhost -u username -p database_name < filename.sql

More information about the command line tools for MySQL can be found here.

If you do not have access to the command line, you may need to send the SQL file to your web host to do this for you.