Are you frustrated by the “Sorry, you are not allowed to access this page” error in WordPress?
This error usually displays when you are trying to see a page in your WordPress dashboard that your user role doesn’t have permission to access.
However, you might also see the error even when you are supposed to have access to that page. This error can be caused by a lot of different reasons, which makes it tricky for beginners to troubleshoot.
In this article, we will show you how to fix 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?
WordPress user roles and permissions define what your users can and can’t do in WordPress. For example, an author on your site wouldn’t be able to edit the post of another author, only their own posts.
If someone gave an author the link to edit someone else’s post, then they would see the “Sorry, you are not allowed to access this page” WordPress error when following the link.
However, sometimes you might see “Sorry, you are not allowed to access this page” when you should have access to view the page.
If you are not the site owner or administrator, and you are seeing this error, then you should contact the site owner or admin to let them know. They can explain why you don’t have access to the page, or they can change your role to grant you access.
If you are the site owner or have an admin role, but you are still seeing the “Sorry, you are not allowed to access this page” error when trying to log in to your own WordPress website, then something has gone wrong with the permissions settings.
Maybe there was an issue with a WordPress update. Maybe there was a problem when a theme or plugin was updated. Or maybe something has gone wrong with your configuration.
If you are seeing this error when you try to log in, then you won’t be able to fix the error by changing your WordPress settings in the dashboard. You will have to work with the files and databases directly.
This can be tricky for beginners, and making a mistake could make things worse. As a precaution, we recommend you first make a complete backup of your WordPress website.
You could also start by contacting your hosting provider. They may be able to fix the problem for you.
That being said, here are some steps you can follow to troubleshoot and fix the “Sorry, you are not allowed to access this page” error in WordPress.
If you’d prefer written instructions, just keep reading.
Checking You Have the Correct WordPress Role
If you are able to log in to the WordPress dashboard, but can’t access specific pages, then your WordPress user role might have been changed, and you are no longer an admin.
From the WordPress dashboard, you can see your user role by visiting the Users » All Users page and looking at the ‘Role’ column.
If you don’t have access to the Users page, then this means that you are not an administrator.
If you or someone else accidentally deleted your administrator account or changed your user role, then you can add a new admin user with phpMyAdmin.
Checking for a Corrupt .htaccess File
If you have an admin user role, and you are still seeing the “Sorry, you are not allowed to access this page” error, then it could be caused by a corrupt .htaccess file. We can check this by renaming the file.
You will need to use an FTP client or the file manager feature in your WordPress hosting account. If you haven’t used FTP before, then you may want to see our guide on how to use FTP to upload files to WordPress.
Using your FTP client, you need to navigate to the root folder containing all your WordPress files. Once you find the .htaccess file, you need to rename it to something else, such as ‘.htaccess.old’.
If you cannot find your .htaccess file, then see our guide on how to find .htaccess in WordPress.
Once you have renamed the file, try logging onto your WordPress site to see if that has fixed the problem. If it hasn’t, then rename it back to .htaccess and move on to the next step.
If you can log in, then you have fixed the problem. The next step is to generate a new .htaccess file. To do that, navigate to the Settings » Permalinks page in WordPress.
Simply click on the Save Changes button at the bottom of the page, and WordPress will generate a fresh .htaccess file.
Checking for Incorrect File Permissions
While you have your FTP client open, we will check to make sure there isn’t a problem with your file permissions. File permissions control who can access files and folders on your website.
The following settings are recommended for most users:
755 for all folders and sub-folders.
644 for all files.
Using your FTP client, you need to navigate to the root folder containing all your WordPress files and select the wp-admin, wp-content and wp-includes folders. Then you need to right-click and select ‘File Permissions’.
This will bring up the file permissions dialog box.
Now you need to enter 755 in the numeric value field. After that, you can click on the ‘Recurse into subdirectories’ checkbox and then select ‘Apply to directories only’ option.
Click on the ‘OK’ button to continue. Your FTP client will start setting file permissions to folders and sub-folders. You will need to wait for it to finish.
Next, you need to select all files and folders in the root folder of your WordPress site and then right-click to select file permissions.
The file permissions dialog box would appear.
This time you need to enter 644 in numeric value. After that, you need to click on ‘Recurse into subdirectories’ checkbox and then select ‘Apply to files only’.
Click on OK to continue, and your FTP client will now start setting file permission for all files on your WordPress site.
Once you have done this, try logging in to your WordPress website again. If you are successful, then you’ve fixed the problem. If not, then move on to the next step.
Deactivating All Plugins Using FTP
If the steps above haven’t resolved the issue, then our next step is to check whether a faulty WordPress plugin is causing the error. We will do that by temporarily deactivating all plugins.
First, you need to connect to your website using an FTP client. Once connected, you need to navigate to the /wp-content/ folder.
Once there, you will see a folder called ‘plugins’. This is where WordPress stores all plugins installed on your website.
You need to right-click on the plugins folder and select ‘Rename’. Next, you should type in a different name. We will call it ‘plugins.deactivate’.
All of your plugins have been deactivated. Now try to log in to your WordPress site to see if this has fixed the problem.
If you still see the “Sorry, you are not allowed to access this page” error, then the problem isn’t caused by a plugin. You will need to rename the ‘plugins.deactivate’ folder back to ‘plugins’ and move on to the next step.
If you can now log in, then you know that one of the plugins is causing the error. We just have to find out which one.
Using your FTP client, rename the ‘plugins.deactivate’ folder back to ‘plugins’, then navigate inside the plugins folder. Now rename the first plugin to something like ‘plugin-name.deactivate’.
Now go back to your site to see if you can log in. If you can’t, then change the plugin’s name back and move on to the second plugin. Repeat the process until you find the one that caused the issue.
Once you’ve found the faulty one, you can switch to a different plugin that doesn’t cause the problem. Or you can contact the plugin author and work with them to come up with a solution.
Activating the Default Theme Using FTP
If the plugin solution didn’t work for you, then we’ll need to check if your WordPress theme could be causing this issue.
This step is similar to deactivating your plugins. You’ll need to connect to your website using an FTP client and navigate to the wp-content folder.
Once there, you will see a folder called themes. This is where WordPress stores all themes installed on your website.
This time you need to right-click on the plugins folder and select Rename. We’ll call it ‘themes.deactivate’.
This will activate the default theme. Now try to log into your WordPress site to see if this has fixed the problem.
If you still receive the “Sorry, you are not allowed to access this page” error, then the problem isn’t caused by a theme. You need to rename the ‘themes.deactivate’ folder back to ‘themes’ and move on to the next step.
If you can log in, then the previous theme caused the problem and you can start to troubleshoot. You could try using a different theme or reinstall the same theme and carefully configure it.
If the error returns, then report it to the theme author. They may be able to help you solve the problem or fix a bug in the theme.
Final Troubleshooting Steps
If you’re still reading, then unfortunately, the other steps haven’t solved your problem. Here are a few more things you can try.
Check Error Log
You may be able to check an error log for clues about what went wrong. Your hosting provider might be keeping logs, or you may have previously set WordPress up to keep them.
For more details, check our guide on how to set up WordPress error logs, or contact your hosting provider.
Update to the Latest PHP Version
If your WordPress site is running an outdated version of PHP, then it may be causing problems. Upgrading to the latest version may be helpful.
For more information, check our guide on how to update your PHP version in WordPress or contact your hosting provider.
Restore Your Most Recent Backup
If you have made a recent backup of your WordPress website, then restoring it to an earlier version is likely to fix the “Sorry, you are not allowed to access this page” error.
The problem is that you will lose any changes to your settings and content made after the backup.
For more information, check our beginner’s guide on how to restore WordPress from backup.
Contact Your Hosting Provider
If you are unable to fix the error on your own, then you should contact your WordPress hosting company to see if there is anything that they can do.
Many providers offer excellent technical support and may be able to solve the problem for you.
For example, they may be able to check their server error logs or have created their own backups of your WordPress site. They will be able to advise you on how they can help and what you should do next.
For the best results, make sure to check our guide on how to properly ask for WordPress support and get it.
We hope this tutorial helped you learn how to fix the “Sorry, you are not allowed to access this page” error in WordPress. You may also want to bookmark our ultimate troubleshooting guide of the most common WordPress errors or see our guide on how to get a free email domain.