Importing via WP Migrate DB Pro’s Import Feature
As of version 1.8 WP Migrate DB Pro includes the Import feature.
To import an SQL file:
- Click on the ‘Import’ radio button on the Migrate tab
- Select an SQL export file to upload and import
- 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
- Optionally select the ‘Backup the database before running the import’ checkbox to backup the current database before running the import
- Check the ‘Do not import the “active plugins” setting’ checkbox to preserve the currently active plugins on the site
- 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 very quick but may take a few minutes if your SQL file is large.
Importing via Command Line
If your SQL file is very large, 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
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.