Tsohost Help Centre

Table of Contents

Change the table prefixes

Updated May 6th at 14:33 BST

You need to use phpMyAdmin to change the prefixes.

Open phpMyAdmin. Check article: https://help.tsohost.com/knowledge-base/article/11999

In the list of tables, click the table name ending in usermeta.

Click SQL.

Highlight and delete the current code in the editing window.

Copy and paste this code in the editing window (please note the differences in backticks vs single quotes):

              UPDATE `tablePrefix_usermeta` SET `meta_key`= REPLACE (`meta_key`, 'wp_', 'tablePrefix_') WHERE 'meta_key' LIKE 'wp_%'

Replace tablePrefix with the table prefix you copied earlier. Be careful not to delete the underscore character after the table prefix. In our example, this code looks like:

              UPDATE `abc123_usermeta` SET `meta_key`= REPLACE (`meta_key`, 'wp_', 'abc123_') WHERE `meta_key` LIKE 'wp_%'

Note: If your original WordPress database had a table prefix other than wp, then you should replace the first wp in the code sample with the original prefix. However, the wp_% should never be changed.

Click Go. The usermeta table is updated.

In the list of tables, click the table name ending in options.

Click SQL, and then remove the existing code again.

Copy and paste this code in the editing window:

             UPDATE `tablePrefix_options` SET `option_name` = REPLACE (`option_name`, 'wp_', 'tablePrefix_') WHERE `option_name` LIKE 'wp_%'

Replace tablePrefix with the table prefix you copied earlier. Be careful not to delete the underscore character after the table prefix.

Click Go. The options table is updated.

Close the phpMyAdmin page.