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

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

Looking for a way to fix the “Sorry, You Are Not Allowed to Access This Page” error in your WordPress website? WordPress is one of the best and most popular content management systems with lots of features and functionalities. But with great features, it has some common bugs and errors too.

Sometimes when you try to access a page or area of your WordPress website,  you may see the error message that you are not allowed to access this page. It’s one of the common WordPress errors and you can easily get rid of this problem by following some easy steps.

Here in this article, we will discuss the reason behind the “Sorry, You Are Not Allowed to Access This Page” error and show you the easiest way to fix it.

What causes the “Sorry, You Are Not Allowed to Access This Page” error?

When you face this error message on your website that means that you have some permission setting that does not allow you to view the page. As an administrator, you have access all over your website but this error will lock out from any specific area. Sometimes this error happens when you update your WordPress core or plugins.

You won’t be able to access the area when WordPress won’t be able to recognize you as an Administrator. Sometimes if your request does not match the content on your database you may face an error message. If your website is running with an outdated version of PHP then it can also be a reason for this issue. Another important reason for this error is the wrong configuration in the wp-config.php file.

If the error doesn’t allow you to access the admin dashboard of your website then you need to use an FTP client or cPanel to gain access to your website and fix the error.

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

Login to your website with an FTP client or cPanel and the first thing you need to do is to create a backup of your website. It will help you to get your website data if anything goes wrong.

Restore a previous version

restoring to an earlier version of your website is the easiest and quickest way to get back your WordPress admin dashboard access. The problem may happen for any recent small changes like updating the theme or plugin. So restoring to the earliest version will easily fix the issue and get back your access to the dashboard.

Deactivate all plugins

Sometimes plugin conflicts can create the error. If the problem occurs after updating some plugins then any of the plugins may conflict with the system. So you need to deactivate all the plugins and check if the problem occurs. If the problem is gone any of your plugins are responsible for the issue. Now you need to activate it one by one and check which one creates the error.

To deactivate plugins go to the file manager option using FTP or cPanel and then navigate to the wp-content folder. Now rename the plugin folder with something else. It will deactivate all the plugins.

sorry you are not allowed to access this page

Switch back to a default theme

If deactivating all plugins won’t fix the problem then you need to switch back to the default theme. Switching back to a default theme process is similar to deactivating the plugin. Go to the themes folder and rename your active theme file name. Now go back to your website and it will show a message that your active theme is broken and it will automatically activate a default theme installed on your website.

Check you are still an administrator

It’s a common problem for a multisite installation that the user role changes for some reason. So you need to make sure that you are still an administrator of the website. To check this you need to access the phpMyAdmin of your website and then go to the user table. Now search for your username or id and check the user role. If you are not an administrator then you can create a new administrator user from here.

Check error log

The wordPress error log is another great way to identify and troubleshoot WordPress errors and bugs.

An error log is a list of the error messages that have happened on your website with the exact date and time. When you enable WordPress to debug mode, it will collect all the error reports on a file. So you can review the error logs to understand the reason for the error and take the necessary steps according to that. 

Upgrade to the latest version of PHP

A backdated version of PHP is also responsible for this error so you need to upgrade to the latest PHP version. Upgrading the PHP version should solve the issue. If the issues still exist then you need to improve your overall website security and performance. 

Reseat your WordPress website

Reseating your WordPress website is the worst scenario. If all the mentioned processes failed to solve the error then there may be an installation issue that happened on your website and to fix it you need to restart your WordPress website. Reseating your website will remove all the post pages and comments so make sure to make a complete backup before that.

Wrapping Up

Following the process, you will be able to fix the “Sorry, You Are Not Allowed to Access This Page” error in WordPress. You can see our other articles to learn How to Reduce Server Response Time in WordPress

How to Integrate Mailchimp With WooCommerce Store

How to Fix Pages And Posts Return a 404 Not Found Error in WordPress

We hope this article will help you. If you like this article please like our Facebook page to stay connected.