Fix “You do not have sufficient permissions to access this page.” on WordPress Admin

Step-by-step guide to troubleshooting the WordPress page permissions error message.

If you’re trying to access the WordPress admin on a website you administrate, and you’ve just logged in with the correct username and password, and seen a grey box with the words:

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

Then you’ll likely be wondering what has happened… what went wrong! And, importantly, how to fix this problem.

The Cause

Usually, when this issue crops up, the root cause is because of a discrepency between the table prefix in WordPress’s user database and the one you have told it to use instead, in wp-config.php

This means that, when the database attempts to say “this user (i.e. YOU! ) is okay to access admin” it cannot, because its looking for the wrong database code.

How To Fix This Issue

Firstly, check if you are using “special” database prefix. There is a line in wp-config.php which looks like this:

$table_prefix = 'wp_';

If yours looks any different to the above, you’re using your own special DB prefix (this is a good thing, because it helps to protect your WordPress website from hacks).

Next, assuming you have your prefix setup differently, you’ll want to open your database in PHPMyAdmin or similar, and navigate to your wp_users (note, prefix will be different!!!) table, and discover the “ID” of the user in question (i.e. your ID from the account which receives the “you do not have permission…” message).

Once you have this ID, let’s imagine it is “43”, then navigate to the wp_usermeta table. Again, wp_ will be your db prefix.

In this table, sort by user_id (by clicking on the title at the top of this column), then navigate to the range of options for user ID 43. Check for the values “wp_user_level” and “wp_capabilities” under the “meta_key” column. If you’re getting the error in the title of this post, they will probably say “wp_” at the start THEY SHOULDN’T!

The values here should feature your table prefix – so press edit for each, and alter them to start with your table prefix. Hit “Go” to save the change. Check the table has updated.

Then login again.

Hey presto! It should be fixed!

Leave a comment below if this works for you – or doesn’t – or if you require clarification.

6 thoughts on “Fix “You do not have sufficient permissions to access this page.” on WordPress Admin”

  1. Hi . Seeing in mywp-config.php here table prefix is same as default wordpress it is – $table_prefix = ‘wp_’; and in mysql database Table: wp_usermeta : wp_capabilities & wp_user lever of all id are with the same prefix. but still Ii am getting the same error. I am looking to know why it is happenning.

    Reply
  2. Using FastCGI Process Manager (FPM) with PHP7.1 produces this problem also. Probably FPM in general? Switched back to mod_php with PHP5.6 and everything works fine again.

    Reply
      • It may be “some other issue” which is presenting in this way. Try with no plugins and the default theme – and see if the issue still happens is my advice. It maybe actually you have run into incompatible plugin or theme file which doesn’t work in PHP 7+ which is causing unexpected behaviour. Or, something else is happening. Its hard to say!

        Reply

Leave a Reply to Robin Scott Cancel reply

No links of any kind allowed in comments - if you add any links, your comment will automatically be deleted.