You do not have sufficient permissions to access this page

If you run a wordpress website and you transfered it to another server/hosting, or made some other significant change, when you try to loggin to WP as administrator, you might get this message:
You do not have sufficient permissions to access this page.

There are several solutions on net I have found, but none of them helped me untill I figured out different issue.

For some, this issue happened because of wrong table prefix in MySQL for some of the columns. So check wp-config file table prefix (usually wp_) and compare it to table prefixes in MySQL database.

Others resolved this with wp_capabilities in wp_usermeta. It should be a:1:{s:13:”administrator”;s:1:”1″;}
Althought in one of my MySQL’s it’s a:1:{s:13:”administrator”;b:1;} and it works fine.

Anyway, after trying that two solutions, I did something that I though might caused problem and yes, I managed to login. In MySQL, look at wp_users. User I tried to login with had ID 6 and ID 5 was missing. I have no idea how that happened but just change ID so all user ID’s goes one by one, fill skipped ID if there is some. I changed #6 to #5 and just that simple thing resolved my issue.

Don't have sufficient permissions to access this page

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

68 − 65 =