Seasoned WordPress users are all too familiar with the errors that can randomly pop up, whether during maintenance or even completely out of the blue. One of these errors is WordPress' dreaded Sorry, You Are Not Allowed to Access This Page. This error can have a multitude of causes and the consequences can be dire. As a page admin, you might lose your access to the WordPress dashboard, partially or entirely.
Being stuck with a white screen that only displays Sorry, You Are Not Allowed to Access This Page can be really frustrating. This article can help you solve the issue quickly and easily, even though you might not be that tech-savvy. You will learn the potential reasons for this error’s appearance and how to fix it as fast as possible.
As it is, the error message isn't too helpful, but it suggests that there is a mismatch between the website files and the database. Data on the page you're trying to access can be inappropriate because of a recent change in WordPress’ core, a faulty plugin, or an outdated theme. The data cannot be processed and causes WordPress to get stuck, resulting in WordPress' Sorry, You Are Not Allowed to Access This Page error. To fully understand it, you have to figure out what causes it in the first place.
The underlying reason for the error often has to do with permission issues, which can be tricky to identify without some troubleshooting. For instance, if the data generated by a theme or a plugin is not recognized or cannot be handled properly by WordPress, the request will simply fail and you will see this cryptic error page.
The same situation can happen when your wp-config.php details are not matched with the database. Another potential reason why this error appears is running an outdated PHP version. Updating PHP should solve the issue in this case, but to be absolutely sure, it's best to follow the troubleshooting steps below.
Before starting the troubleshooting process, create a backup of your site. This will help you to restore the website if something goes wrong while troubleshooting. Skipping this step can ruin your website and will require twice the work to get it fixed.
If you clearly remember what you did just before the WordPress Sorry, You Are Not Allowed to Access This Page error popped up, it is very likely that it was caused by this action. For instance, updating from one WordPress version to another can cause database issues that may lead to the error.The easiest way to solve this issue is by reverting your website manually to a previous version.
Similarly, the issue can also occur after installing a new theme or plugin. If the error appeared immediately after installation, one of them is surely at fault and uninstalling the theme or plugin should bring the website back to normal.
The WP_Debug tool can list all the PHP errors that are encountered by your website. Navigate to wp-config.php and copy & paste this line of code:
define( ‘WP_DEBUG’, true );
Save the file and you will be able to see an extensive list of debug messages when you access your site again. You can now see which message triggered the WordPress Sorry, You Are Not Allowed to Access This Page error and fix it accordingly.
Similarly to using the WP_Debug tool, you can also verify the access and error logs of the server itself. These logs are more detailed, and they can help you prevent further guesswork. See your hosting provider's documentation on how to find your server's access and error logs. Usually, they are stored in the /var/log directory, but this can differ among hosts.
If you’ve received plugin security notifications that you ignored at the time, they might be the reason behind the WordPress Sorry, You Are Not Allowed to Access This Page error. Check your current and old emails twice to see whether you have to update your plugins or not. Don’t overlook your spam folder either.
Incorrect file permissions are a common cause of Sorry, You Are Not Allowed to Access This Page messages. You need to use an FTP program and the details provided by your web host. Locate the public HTML folder and look for the wp-admin and wp-content subfolders. Highlight the folders, right-click them, and select the correct permission attributes recommended by WordPress.
The Sorry, You Are Not Allowed to Access This Page problem can be caused by themes or plugins. If the theme is faulty, access your server using an FTP program and go to the themes folder, located in wp-content. Rename the folder and refresh the broken page. If the problem is fixed, the theme you are using is the cause.
Conversely, if you access the plugin folder and rename it, following the same steps as above and the website works, you will have to figure out which is the faulty plugin from the list. To do that, deactivate each plugin manually and refresh the website after each deactivation. This way, you will find the plugin that caused the problem and you can delete or fix it.
Using an FTP program, navigate to the .htaccess file in the root WordPress directory. Download and keep a copy of the file safely on your computer. After that, you can edit the file back to its defaults, save it, and then re-upload it to the server. Now go back to your website and see if the issue is resolved.
As mentioned before, your site’s PHP can be the reason behind receiving this error message. The problem can be easily fixed. Check if the PHP version is compatible with your WordPress version. If not, download the appropriate version of PHP and install it. With shared hosting, you may need to contact your hosting provider to do so.
When the PHP version is not the problem, you should check the database prefix. To do this, open the wp-config.php file and check the value of the prefix. The prefix is usually wp- and it should match the one used in the database. If you notice any discrepancies between the two, correct it and the Sorry, You Are Not Allowed to Access This Page message should disappear.
If none of the solutions provided above work yet you are still stuck with a WordPress Sorry, You Are Not Allowed to Access This Page error, the only option you have is to fully reset the website. Export all of your content, store it safely, and install WordPress again manually. After the installation, import your content back and see if the error disappears. If you are planning to change some URLs to benefit your needs, follow this guide to have a smooth site migration process without losing your rankings.
You should also keep in mind that your WordPress settings might be faulty as well. Export your setting preferences so that you can restore them after troubleshooting. Reset the settings to their default form and see if the problem goes away. If yes, you know where to look for the issue.
The WordPress Sorry, You Are Not Allowed to Access This Page error message is not easy to fix, considering how many potential causes it has. Even so, once you’ve figured out what was the reason behind its appearance, all you have to do is follow the pieces of advice listed here. If none of these tips fix your error, wait for a while and refresh your page. Sometimes, caching prevents your fixes from showing up immediately.
If you enjoyed reading this article on how to fix the WordPress sorry, you are not allowed to access this page, you should check out this one about how to fix the WordPress missing a temporary folder.