Several WordPress errors are warnings or notices that something is wrong with your website. However, the Sorry You Are Not Allowed to Access This Page notice is actually looking to help you.
There are several reasons why this error occurs. However, there are also some simple ways to fix this error.
In this article, we will be offering you 5 ways to fix the Sorry You Are Not Allowed to Access This Page error. Before we delve deep let’s first get some information about what the error is.
Understanding the Sorry You Are Not Allowed to Access This Page Error
This error is unusual and unlike other WordPress errors, this isn’t warning you of an error with the website. In fact, the end-user won’t experience the change. But, on the other hand, you won’t have access to your website till it has been fixed.
The issue is regarding a configuration error of some kind. As you can conclude from the error notice that user permissions are often the main culprit. Having said that this error generally pops up after making changes to the back end of your website. Even updates can also be the cause of this error.
Suggest for Reading:
- Parse Error: Syntax Error Unexpected in WordPress
- How to Fix the XAMPP Error ‘Apache Shutdown Unexpectedly’
5 Ways to Fix the Sorry You Are Not Allowed To Access This Page Error
Rollback/ Restore a Previous Version of Your Website
The easiest and often the fastest method to fix the issue and get back to the WordPress dashboard is by restoring your website to an earlier version. A recent change in your website might be the reason for this error. Reverting the modifications should allow you to access your website once again.
However, there is one drawback to this solution. i.e: you may lose your recent changes and will need to look for a way to complete your goals without causing the same error again.
Due to this reason, you may need to restore your backup to a staging site instead. You can then test various modifications to identify the root cause of the problem. Once you have uncovered the cause of the error, you can undo the troublesome change to recover access to your website.
Disable All of Your Plugins
There are possibilities that you are experiencing the Sorry, you are not allowed to access this page error on your website because of the recent addition or upgrade of a plugin. If you doubt that this is the case, the ideal choice would be to disable plugins one by one.
While disabling plugins, if you observe that the message doesn’t appear, congratulations! you have found the source of the problem. You can then troubleshoot the issue by disabling that plugin.
In case you have locked out your dashboard completely, the process gets a little tricky. You will need to access your website using SFTP via an FTP client. Once you have done, go to wp-content and look for the sub-directory labeled plugins:
Enter the plugins folder, and then rename your most recently-added plugin to something like “plugin-name_old”. Navigate to your website and verify to see if the error is fixed. If not, revert the plugin’s name and repeat the process with the next one.
Activate a Default Theme
Yet another potential reason for this error to occurs is due to a recently updated or installed theme. Your best bet for resolving this problem is to activate a default WordPress theme such as Twenty Twenty or Twenty Nineteen.
If your WordPress dashboard is locked, you’ll have to utilize FTP once more. Connect to your server with FileZilla and then go to wp-content > themes:
The remainder of the process is just like the one that we saw for disabling the plugins.
Rename the folder for your active theme, and then go back to your website and log in. You should view a notification informing you that the active theme is broken, and a default theme has been reactivated.
Then you can troubleshoot the theme. Your website should at least be accessible, even though the wrong theme was activated.
Make Sure Your File Permissions Are Correct
While we are utilizing SFTP, we can check few other aspects of your website under the cover. File permissions may also be chief cause of the Sorry You Are Not Allowed to Access This Page error.
In your SFTP client, pick the wp-content, wp-includes, and wp-admin folder. Then, right-click and locate the File Permissions setting. FileZilla has a clear option for this, however, Cyberduck wraps the settings within the Info panel:
In the dialog box, you need to match the permissions where its feasible:
- The Numeric Value is set to 755.
- You have checked Apply to directories only.
- Recurse into subdirectories is checked.
On matching the settings, save the permission and do the changes on all the files inside the website’s directory.
This time, check if the changes Apply to files only and Recurse into subdirectories boxes, and set the Numeric Value to 644.
The implications behind these numbers and options are past the extent of this article. But, it assures that the correct file permissions are set to permit access to your website.
Once done, verify whether the error has vanished. If not then head on to the next method.
Generate a New .htaccess File
There’s one more step we can try to get your website back up and running. Your .htaccess file is an Apache server configuration file, and it could be the cause of this error.
To find out, head on to your website’s root directory through SFTP. Once you’re here, search for the .htaccess file. If you are unable to find it, it’s either a hidden file or doesn’t exist because of your host’s server (usually Nginx).
However, once you’ve found it, right-click and rename it – .htaccess-backup is ideal. Next, right-click and download the file to your computer.
You’ll now need to open the file in your text editor, clear out the contents, and add the below code:
#BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCOnd %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#END WordPress
This is a default .htaccess file, and on finishing, save your changes and upload it to your server.
Once again, check your website and go ahead if you still experience the error.
Conclusion
We hope this article helped you fix Sorry You Are Not Allowed to Access This Page.
Additionally, you can check out our Managed WordPress Hosting plans that is optimized for performance, speed & SEO ready to grow your business.