You do not have sufficient permissions to access this page

by Jhet Bhlak on November 30, 2011

Yesterday I started getting the dreaded, “You do not have sufficient permissions to access this page” error on one of my WordPress blogs (not this one) when I tried to log in with any admin account.

Before I go any further…always always always backup your database and wordpress files before making changes! Don’t blame me if you turn your website into a digital paperweight after trying out the solutions presented here. BACKUP FIRST! 🙂

This error seemed to occur out of the blue. It has been about two weeks since I’ve done any work to that blog at all and the last thing I did was to add a simple blog post. I had not added any plugins, modified any files, added/updated any widgets or added any php/html code to the website.

I called the hosting company to put in a ticket to see if they could fix the issue. After 24 hours with no fix, I started delving into the problem myself.

The problem ended up being related to the data in the two tables wp_options and wp_usermeta. Several fields in the option_name and meta_key columns ended up having extra letters added. Instead of starting with wp_ the fields were now starting with wpcr_. As an example, one of the values was changed from wp_capabilities to wpcr_capabilitites.

So I went through the wp_options and wp_usermeta tables and manually changed the values back to having the wp_ prefix instead of the wpcr_ prefix. After all the offending values were changed back I had full admin access again. Special thanks to this post for pointing me in the right direction.

As a side note, I have asked the hosting company to see if they can find out exactly how the changes were made to the database since I am the only one who should have access to do that. If they let me know how the change happened I will update this post.

Solutions that did not work for me but may work for you:

  1. Log into the database and change the database version to 8204, re-log in and follow the WordPress prompts to upgrade your database. You can find the database version in the wp_options table, the option name is db_version. I found the instructions to do this here.
  2. Another fix that I found and tried was to move all my plugins to a folder called old_plugins to see if the issue was plugin related. If the error goes away, move your plugins from the old_plugins to the plugins folder one at at time to see which plugin is causing the issue. I found this possible solution here.

{ 4 comments… read them below or add one }

Deron December 8, 2011 at 12:12 pm

Hey thanks for this post (found using Google).

This is exactly the issue that was causing mine not to work. I updated all the names in the tables and works like a champ.

Thanks again!

Jhet Bhlak December 8, 2011 at 12:16 pm

Sure thing! It was a pita to find the right answer and the hosting company has not even told me why the issue happened in the first place.

I’m glad the post helped you fix your issue too!

Deron December 8, 2011 at 12:20 pm

I used cpanel to install wordpress, I imagine maybe there is a bug in cpanel version of wordpress itself that doesn’t update the fields/values when someone uses a custom prefix?

Googling shows a ton of people with this issues, all with different solutions, so who knows!

Jhet Bhlak December 8, 2011 at 12:30 pm

That sounds right. I’m still baffled as to why my site database was changed though. The only thing I can think of is that it was somehow changed because it is on a shared hosting account.

Previous post:

Next post: