You must have got frustrated by seeing the “Sorry You are Not allowed to Access this Page” while working on your WordPress website. We are going to share some of the easiest methods to tackle this error on your system.

This error generally occurs while editing your WordPress website or during the time when you are making some important changes. This might destroy your work which you were doing for hours. To prevent this situation from happening again, We need a permanent fix.

Here are the methods that we have tried and tested, which would fit in this particular fix for the error:

  1. Revert back to the previous version of your site
  2. Use WP_Debug to know about the possible errors
  3. Check your Access & Error logs
  4. Check for possible Plugin Security Notification
  5. Try Deactivating the Plugins & Themes
  6. Check the File Permission access to your website
  7. Reset your .htaccess file manually
  8. Upgrade the PHP version of your WordPress website
  9. Check the database Prefix of your website
  10. Completely Reset your WordPress website

But before that, let us see what is the actual reason behind this error. What is the cause of this error on your WordPress website?

Cause of “Sorry You are Not Allowed to Access this Page” Error on your WordPress website

This error generally occurs because of some security or permission issues. But, you cannot find the exact root cause of this error so easily. There are various possibilities that might cause this specific error on your WordPress website.

  • There can be chances that the website is having issues with the file names and database.
  • If there are plugins and themes on your WordPress website which might not work properly with the WordPress version you are using, it might cause this issue.
  • Sometimes the data might not get completely processed, which will also cause the “Sorry You are Not Allowed to Access this Page” error on your WordPress website.
  • In some cases, the main problem is due to the conflicts raised in the database of a WordPress website.
  • This error can also happen due to the mismatch of Username and Password with the database from your wp-config.php file.
  • You might see the error because of any mismatch of files, names, credentials in the database of your WordPress website.
  • If you are using an outdated PHP version for your WordPress website, this might also raise the error on your WordPress website.

Methods to Fix “Sorry You are Not Allowed to Access this Page” Error in a WordPress website

Before we begin, you should take a backup of your website for safety purposes. Just in case if anything goes wrong, you must have a way to get the latest version of your WordPress website.

1. Revert back to the previous version of your site

While troubleshooting this error, you might have got a solution to reverting back your website to the previous version.

There are chances that you might have done some changes in your website which can result in showing this error on your WordPress website. Although, it is not necessary that the changes to layout or posts might have caused the error.

You can use different plugins available in the WordPress library, like WP Rollback. These plugins will help you to revert back to the previous version of your website. Also, you can try restoring the backup that you must have downloaded before the occurrence of this error on your website.

2. Use WP_Debug to know about the possible errors

If you do not know the exact time when the error occurred for the first time, you might not want to restore any version of your website. This is when WP_Debug comes into action. With WP_Debug, you can get the list of all errors on your WordPress website.

To use WP_Debug, open the wp-config.php file from your File Manager / FTP client. Now, Edit the file and add the following code if it doesn’t exist already:

define( ‘WP_Debug’, true );

Once you add this line in your wp-config.php file, you will see the debug messages from WordPress on every individual page of your website. Now, check for the error that says “Sorry You are not allowed to access this page” on any individual page of your WordPress website.

You can even check the log file to see all the errors that have been generated at a single place. To check the log file, simply navigate to “wp-contents/debug.log”. Here you will be able to see the errors in just one place that is a lot easier.

3. Check your Access & Error logs

You can review your error logs easily from your Hosting panel. You can simply raise a ticket if you are unable to find out the error logs of your WordPress website. Most of the time, you will get the error logs which will clarify the reason behind the actual cause of this error.

Also, You can use the .htaccess file to log the errors from your WordPress website. With this method, you can get the actual cause, and then you can move ahead for the solution. Narrowing down the process is very much important in errors like this.

4. Check for possible Plugin Security Notification

You might also see this error as a result of a possible attack or hack on your Website through any malicious plugin. As we get to hear about a lot of security breaches in the plugins & themes on the WordPress platform, you might also be a victim of the same.

If you have any security plugin installed on your WordPress website, it will send a notification through Email and WordPress dashboard as well. You can check for the possible email notification about any security breach of the plugin that you have installed.

However, If you didn’t install any security plugin before this, don’t worry. There are multiple plugins available on the WordPress library that keep the record of activities on your WordPress website. One of these plugins is the WP Security Audit Log. Just install and check for the root cause of this error.

5. Try Deactivating the Plugins & Themes

Any recently installed or updated plugin can also cause this error on your WordPress website. You might want to deactivate the plugin in order to check the reason behind this error. Sometimes, the new plugin updates can cause a big problem on your website.

Just to be on a safer side, you can try deactivating the plugins & themes one by one. If you are unable to access your WordPress dashboard, you can deactivate your plugins & themes from the FTP client. Once you are done, this might resolve the problem in case any plugin or theme was the reason.

If you don’t see the error again after deactivating the plugins & themes, the real culprit was any theme or plugin. Now the next big thing is to check which one plugin was causing the issues. Simply, try reactivating the themes & plugins one-by-one. Check if the error occurs again every time you reactivate any plugin or theme.

6. Check the File Permission access to your website

You might need to check the file permissions that might be configured incorrectly. Sometimes, if you don’t have permission to access any file from the database, it causes a similar error. You can check for the permission access of files that are prone to causing this error.

However, you might need to do some work in order to check the permission access to specific files. But don’t worry, We are here for you. These are the easiest ways that we are going to share. Follow these steps to check if everything is correct & working.

  1. Firstly, open your FTP client. You can use any of the FTP clients you prefer, like FileZilla, etc.
  2. Now enter the host details and credentials to log in to your Web Server.
  3. Now, locate the public_html file and open it.
  4. Now, select the folders which are named as “wp-admin”, “wp-content”, “wp-includes”.
  5. Then, select the “File Permissions” option from the right-click menu.
  6. From the Change File Attributes dialogue box, Find the field which says Numeric Value. You need to make sure that the Numeric Value is set to “755”.

  1. Also, tick the checkbox which says “Recurse into subdirectories” and “Apply to directories only” options.
  2. Now Click OK, that will save the changes you have made.
  3. Navigate back to the files under public_html and select all of the files from this folder.
  4. Excluding the already altered folders, select these files and right-click on them. Select File Permissions.
  5. This time, you need to set the numeric value to 644 from the Change File Attribute windows. Check the “Recurse into Subdirectories option.
  6. However, this time, check on “Apply to files only”. Click on OK to save the changes.

This will resolve any issue that is raised due to the incorrectly configured file permissions. As it will reset the permissions of all the files from your WordPress website. Make sure that you set the numeric value of the three folders mentioned before to “755” and the rest of the files get the Numeric Value as “644”.

7. Reset your .htaccess file manually

If the previous methods didn’t work as you expected, you can try resetting the .htacess file on your website. In some instances, the .htaccess file might cause the error if it is having some issues. You can try to reset it manually.

  1. Firstly, you need to access the public_html file from your FTP client.
  2. Under the public_html folder, you will see a .htaccess file. In case you don’t see, try changing the settings and allowing to show .dot hidden files.
  3. Once you locate the .htaccess file, you need to rename the file as we are going to upload a fresh one. Just rename the file as .htaccess_old
  4. Download the .htaccess_old file that you have just renamed. Simply right-click on the file and look for the download button.
  5. Once you have downloaded the file locally, open it in any of the text editors like Notepad. Now replace all of the content with the following text. Just copy the code from here and paste it in the file you have downloaded locally.
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

  1. Once you have pasted the text, rename the file back to .htaccess. Save the changes and upload the .htaccess file in the same location under public_html. This will reset your .htaccess file and you might not see the error again if this file was the reason behind it.

8. Upgrade the PHP version of your WordPress website

In some instances, the older PHP version might cause this error on your website. Some plugins and themes or even WordPress don’t support the outdated PHP version. You might have seen the messages which say about the incompatibility of the PHP version with the current deployment.

Also, using the Older PHP version can raise security issues on a WordPress website. This will eventually cause “Sorry You are Not allowed to Access this Page” error. So, it is always recommended to use the latest compatible PHP version on your WordPress website.

You need to check the compatibility of all of the plugins, themes & your WordPress deployment with the latest PHP version.

Once you check the compatibility of the PHP version by using plugins, you need to take a backup of your website. Make sure that you have the latest backup of your website, as mentioned earlier.

To upgrade your PHP version to the latest compatible one, you can do it with the help of cPanel. Just open the cPanel of your website hosting, Click on Select PHP version.

From the settings, click on the most latest PHP version which is compatible with all your plugins & themes. Save the changes & you are good to go.

If you are using VPS, you can do the same using the Command line. You need to open the console and paste some commands to change the PHP version of your website.

9. Check the database Prefix of your website

If the error still persists, you need to make sure that the database is correctly configured. If you have developed the website on a local server and then migrated the files to an Online Host, you might need to check for the database prefix.

As you have made changes from the local to live server while migrating, there are chances that the database was misconfigured. The table might have some mismatch which might cause the “Sorry You are Not Allowed to Access This Page” error on your website.

Once you find any mismatch in the wp-config.php file, this is where you have got the solution. Edit the file and match the prefix as mentioned in the database. Once you are done with the fix, save the changes & check if the error is occurring again on your website.

10. Completely Reset your WordPress website

If you have tried all the methods listed above, this one is the last ray of hope for you. Before we begin, you need to make sure that you have the latest backup of your WordPress website.

You might see the error because of any issue with your WordPress installation. The last thing to do in this case is to reset your WordPress website completely. This will delete all the content, plugins, theme & everything from your WordPress database.

To do so, you can simply use any plugin which reset the WordPress database. This will result in deleting all the records in the database, files, folders from your last WordPress installation.

Let’s Conclude

These were all the methods that you can use to fix the “Sorry You are Not Allowed to Access this Page” error on a WordPress website. If you have any doubts or facing any problem while trying these methods, let us know through the comments.

We hope that you find the fix of this error easily without having to reset the complete website. If you were successful in solving the error on your website, share your experience with us. Follow us on Social Media channels to get the latest updates.

Happy Debugging😜!!

Previous ArticleNext Article

Leave a Reply

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