Troubleshoot “You do not have sufficient permissions to access this page.”

Changing the db prefix on a WordPress installation requires more than simply changing the prefix on the tables. There are also options that use the db prefix in the options tables. You’ll need to update them as well. Specifically the wp_user_capabilties and the wp_user_level keys in the {db_prefix}_options table.

See the following tutorial for further information:

How to Change the WordPress Database Prefix to Improve Security

The smartest way you can protect your database is by changing the database prefix which is really easy to do on a site that you are setting up. But it takes a few steps to change the WordPress database prefix properly for your established site without completely messing it up.

Example SQL Queries

UPDATE new_usermeta
SET meta_key = REPLACE(meta_key,'old_','new_');

UPDATE new_options
SET option_name = REPLACE(option_name,'old_','new_');