Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Did you do this on a live site with themes and plugins installed? –  Wyck Mar 14 '13 at 0:45
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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 Mar 15 '13 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 Mar 15 '13 at 10:05
    
Thanks Kevin & brasofilo. –  Steve Mar 15 '13 at 10:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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