I recently changed the database table prefix from wp_ to something else, for security reasons.

Since then, I am unable to reach /wp-admin, instead receiving

You do not have sufficient permissions to access this page.

I read this question, and I renamed wp_user_roles to myprefix_user_roles.

This did not resolve the problem, even after clearing my browser cache and cookies.

How do I resolve this?

  • Did you do this on a live site with themes and plugins installed?
    – Wyck
    Commented Mar 14, 2013 at 0:45

1 Answer 1


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_');
  • I found wp_user_level but not wp_user_capabilties. Interestingly, I didn't find _user_capabilties in any of my Wordpress site databases, all running WP3.5.1. After updating the 2 wp_user_level entries, the issue remains.
    – Steve
    Commented Mar 15, 2013 at 9:47
  • I didn't find wp_user_capabilities because I was using a standard PHPMyAdmin search, which searches the value, and not the key name. When I ran the SQL query on the wpbeginners.com site, I found the wp_user_capability keys.
    – Steve
    Commented Mar 15, 2013 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.