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–an application that allows you to access your MySQL database from your web browsers–through our User Portal (our version of the cPanel), clearing the current default database, and importing your database.
Importing your database will be done in four steps:
- Access phpMyAdmin from your User Portal.
- Select the production default database.
- Drop the default tables.
- Import your database.
1. Access phpMyAdmin through your User Portal
First log into your User Portal and find your environment on the Dashboard or Sites page. Select phpMyAdmin from the left-hand navigation on the Overview page for your environment.
For additional instructions on how to access the client portal, manage installs, and access phpMyAdmin, see User Portal Overview
2. Select the default database
Every install at WP Engine has two databases that are accessible via phpMyAdmin.
The first is labeled snapshot_ and is just for your 1-click staging site
The second is labeled wp_sitename (e.g. wp_kristoff in the screenshot below) and is for your production (or live) environment. This is the database we’ll be using in this step.
The wp_sitename database is initially set up as a default WordPress database, containing only the bare bones of an installation.
Click on the database with “wp_” in the name.
3. Drop the Default Tables
Before importing your database we want to create a clean slate to make room for your incoming database.
First, click on Check All to select all of the database tables. Next, from the drop down menu that appears beside Check All, select Drop. Then click on Go in the bottom right corner.
From here you’ll be presented with a confirmation screen. Click Yes to confirm and then the existing tables will be dropped. This will leave you with the perfect conditions for uploading your database.
4. Import your Database
Now you are ready to import your database into WP Engine.
Click on the Import tab at the top of the menu. Next, click on Choose File and select your database export file that you previously saved to your computer (called something similar to wp_kristoff (1).sql).
Finally, click on Go at the bottom of the page.
You will now see the new tables in the database, along with a report stating that the import has been successfully finished.
Check database prefix
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;
What to do if your import failed
If your database import failed, there could be a few different reasons for this. It might be that your database is too large, in which case it needs to be manually imported. Another reason could be that there was an issue with the export.
If your import failed, please contact our support team at WP Engine Support. We are more than happy to help.
Good job, now that your database is imported you can move on to the next step!
Note: 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) is limited to 1MB of data per option. Database rows that are not automatically loaded are limited to 4MB of data per option.