At this point, you should have an exported file saved locally on your computer called something like wp_yoursite.sql (e.g. in our previous article it was called wp_kristoff (1).sql). We will now import your database file into your WP Engine environment.
If you are following along on the Migration Checklist in the User Portal or need a little more information, this is the first task in the Import Phase.
This section will walk you through accessing phpMyAdmin through our User Portal (our version of the cPanel), clearing out the current default database, and importing your database file.
- Login to the User Portal
- Select the environment name to wish to import the database to
- Click phpMyAdmin
Select The database
Expand the database name where you’d like to import the new database content by clicking the database name.
- The primary database for the environment will be titled: wp_environmentname
- If you have created a legacy staging site, you may see a second database called: snapshot_environmentname
Drop The Database Tables
Before importing your database you must create a clean slate and make room for your incoming database.
- Click on Check All
- From the dropdown, select Drop
- Click Go
- Another screen will display confirming the change, click Yes
NOTE: Typically all tables should be dropped before attempting a database import. These steps may need to be performed several times, until no tables show and the interface reads “No tables found in database.”
Import Your New Database
- Click on the tab Import
- Click on Choose File
- Locate the new database file on your local system and select it
- In many cases this file is called something like wp_environmentname.sql
- Click Go
- You will now see the new tables in the database, along with a report stating that the import has been successfully finished.
Confirm The Database Prefix
Once you have successfully imported your database, you will need to check if your table prefixes are different from wp_.
If your tables do not start with wp_, please read How to change the table prefix to ensure your site works properly on our system.
If your expected row count within phpMyAdmin doesn‘t match what’s on display, it may be due to how the table‘s information is handled within MySQL. To get more information on the desired table, run the following commands from the SQL tab within PHPMyAdmin after selecting a database:
View exact count of rows for a table:
SELECT COUNT(*) FROM wp_posts;
View information from PHPMyAdmin table status:
SHOW TABLE STATUS;
If your database import failed, there could be a few different reasons for this.
- Your database is too large, the maximum database import size is 50M
- Upload the file to _wpeprivate using SFTP and reach out to Support to have it imported
- Otherwise, export the database from the previous location as groups of fewer tables, rather than the whole database
- There was an issue with the export
- Attempt the export again, but this time with just a few tables. If this works continue importing tables a handful at a time until an issue is found.
- WP Engine runs daily maintenance processes that enforce limits on database options to preserve the stability of the site and the platform. Autoloaded rows (generally located within the wp_options table) are limited to 1MB of data per option. Database rows that are not automatically loaded are limited to 4MB of data per option.
If your import failed, and you’re unable to deduce why, please contact our support team at WP Engine Support. We are more than happy to help.