Sometimes when you are trying to access a page in your own WordPress dashboard, you get a frustrating response like “Sorry, you are not allowed to access this page”.
At times the error is shown because you are not allowed to access that page based on the user role you have on that website while at times even when you are supposed to access the page, you receive the same error.
There can be several reasons to trigger this error and in this tutorial, we will understand how to troubleshoot the "Sorry, You Are Not Allowed To Access This Page" error in WordPress.
What Causes The "Sorry, You Are Not Allowed To Access This Page" Error In WordPress
In WordPress, what one can access is defined based on the role they have in the website. For example, if you are an author, you might not have access to the administration settings as you can only have access to write and edit your posts.
Create Amazing Websites
With the best free page builder ElementorStart Now
This is why whenever you will try to edit someone else's post or head over to the administration settings, you will get the "Sorry, you are not allowed to access this page” error on your WordPress.
On the other hand, let's talk about pages that you can access while you still get the same error. Here is what to do:
If you are not an owner or administrator then there must be some problem from the upper end. You should contact the owner or the administrator of the website and they can grant you access.
If you are an owner or administrator of the website then there must be a problem with the permissions, your WordPress theme, an update or your WordPress configurations.
In such a situation, you should contact your hosting provider as they might be able to help you out. If not head over to other troubleshooting options but make sure to backup your WordPress website beforehand.
Check If Your WordPress Role Is Correct
There might be a problem with your user roles in WordPress if you can log in but are unable to access a particular page. You might want to contact the website owner and get your user role changes. Here's how you can change the user role in WordPress.
From the WordPress dashboard, head over to the users and then All users.
Under the role column, you will see your WordPress user role. If you can not access the user's page, that means that you are not an administrator.
It is also possible that somebody has changed your user role or deleted your administrator account. In such a case you will have to add a new user via phpMyAdmin to the WordPress database.
Check If There Is A Corrupt .htaccess File
If you have your administrator role and you are still unable to access the administration settings of your WordPress website, you may have a corrupt .htaccess file in your database.
Using an FTP client you will have to rename the .htaccess file from your database. First, you need to find the .htaccess file in the root folder that has all your WordPress files and then rename it.
After you have successfully renamed the file, try logging in to your WordPress again and see if the problem is solved. If there is still a problem, rename the file back to .htaccess and follow this tutorial further.
Next, you will have to generate a new .htaccess file by going to the Settings in your WordPress dashboard and then Permalinks.
On the Permalinks page, just click on the Save Changes button at the bottom and WordPress will create a new .htaccess file.
Check If There Are Wrong File Permissions
After generating a new .htaccess file, while you are navigating through the root folder of WordPress, make sure to check if there are any incorrect permissions. File permissions define which files can be accessed.
644 means all files
755 means all folders and sub-folders
These are the recommended settings and will work for most of the users. In the root folder, select the wp-admin, wp-content and wp-includes and then right-click to select File Permissions.
You will see the permissions dialogue box where you need to add 755 in the numeric value field. Next, you need to check the Recurse into subdirectories and then enable the Apply to directories option at the bottom.
Press OK when you are done and all the settings will be applied. It might take some time so you will have to wait.
For the next step, you need to select all the files and folders in your WordPress root folder and then right-click to select File Permissions.
Just like before, the permission dialogue box will appear.
But here in the Numeric Value field add 644. Then tick the Recurse into the subdirectories box and then enable Apply to files only and then press OK.
It will take some time till the FTP client settles the file permissions and then once again, try logging in to your WordPress. If the problem is still not solved, let's move to the next step.
Deactivate All Plugins Using FTP
If the steps above have not resolved the problem, we will check if the plugins are causing the issue by temporarily deactivating all the plugins at once using the FTP.
Once you have connected your WordPress website with FTP, go to the wp-content folder from your WordPress root folder.
There you will see the file carrying all the plugins. Just rename this file to something else such as plugins.deactivated in this case.
This will deactivate all the plugins at once. Now you can go back and retry to log in to your WordPress. If it works, you will have to check which plugin is causing the problem.
To check the plugins individually, rename the plugins.deactivated folder back to plugins.
Next, enter the folder and rename the first plugin to something like plugin-name.deactivate and the plugin will be deactivated. Then, go back to try and log in to your WordPress. Repeat the process for all the plugins to find out which plugin is causing the problem.
While if deactivating all the plugins did not resolve the issue. We still have some other methods to try and get out of this.
Activate The Default WordPress Theme Using FTP
If the plugins are alright, we will have to check out if there is a problem with your WordPress theme. Similarly, you will have to connect your FTP client with your WordPress and then go to the wp-content folder from the root folder.
In the folder, rename the themes folder to themes.deactivate and this will deactivate your current WordPress theme and enable the default WordPress theme.
If you can log in to your WordPress it means that there is some issue with your WordPress theme. You can either switch to a different theme or reinstall the same theme and configure it correctly. If the issue stand, you can contact the theme creators to resolve the bugs.
If your issue is not resolved yet, here are some of the final options that might get you through this.
- Contact your WordPress hosting provider and ask him to check log errors. Your hosting provider might be keeping logs and log errors can hint you the issues your website is facing.
- Your WordPress version might also be a problem.If your WordPress is running on an older PHP, try updating it to the latest version.
- Try restoring your website to a recently created bacup. However, it might as well resolve the issue but it will also erase all the settings you have made after the backup.
These are some of the methods that you can try to resolve the "Sorry, You Are Not Allowed To Access This Page" error in WordPress. However, if you are not able to solve the problem on your own, you should contact your hosting provider for technical support.
We hope this tutorial helped you fix the "Sorry, you are not allowed to access this page" error in WordPress. We have listed all possible methods that will help you resolve the issue. Make sure to join us on our Facebook and Twitter to stay updated about our posts.