When migrating your website to WP Engine, you may need to update your wp-config.php file to match the prefix used by your WordPress database tables. The standard prefix for all WordPress tables is typically “wp_” but it’s possible that you or your team have edited this in the past. If your WordPress database tables do not use “wp_” in front of the table name and use a different prefix instead, follow the steps below to update the wp_config.php file.
Check your table prefix
First you will want to check what your WordPress database table prefix is set to currently. You can do this by accessing your database via phpMyAdmin in your User Portal. Navigate to the Overview page for your site environment, then click “phpMyAdmin” from the menu at the left. Select the “wp_environment” option unless you are specifically trying to access your 1-click staging database for this environment. In the center of the page you will see a list of database tables:
Normally each table (users, usermeta, options, posts, etc) begins with “wp_,” but in this example you will see my database tables begin with “test_” instead. In this case I would need to update my wp-config.php file to ensure my prefix is listed as “test_” instead of “wp_.”
Log in via SFTP
First, access your website using your SFTP client (Filezilla, Cyberduck, etc). If you have never used SFTP before, checkout our SFTP guide to get started.
Once the file is opened in your text editor, towards the top, you will see this line:
$table_prefix = 'wp_';
Change this line to reflect your table prefix. For example, if your table prefix was wekw_, you would change the line of code to this:
$table_prefix = 'wekw_';
NOTE: Don’t forget the _ at the end of the prefix.
Once you save the file, you will have successfully edited your table prefix!