How to Fix the “Sorry, You Are Not Allowed to Access This Page” Error in WordPress

Anand Tripathi
5 min readAug 28, 2023
Photo by Markus Spiske on Unsplash

Don’t forget to subscribe Pythonistas for more content like this👇

You are visiting this page because you just encountered this error “Sorry you are not allowed to access this page” and you cannot access your WordPress admin dashboard or some of the pages. It's really a nightmare when this happened. Or it was for me as I was stuck out of the admin portal and I spent a lot of time going through the answers on the web for it.

Luckily there are many solutions to fix this as this error is quite generic and does not generally happen due to a single cause. In this blog firstly I will tell you what was the solution that fixed my issue and then I will list out some other fixes as well.

The solution that worked for me

In my case somehow my administrative privileges were removed from the database and to fix that I used phpmyadmin.

For that look for the wp_users table in PHPMyAdmin