The message ‘Sorry, you are not allowed to access this page’ is a frequent error encountered by WordPress users.
This error typically appears when your user role lacks the necessary permissions to view a page in the WordPress dashboard. However, it can also occur even if you should have access.
We have experienced this issue before and understand how confusing and frustrating it can be, especially for site owners or administrators.
In this guide, we will outline the steps we take to troubleshoot this error on our own websites.
⚡ Quick Summary:
This error is generally due to a mismatch in permissions or a security setting. The top three solutions are:
- Reviewing User Roles
- Resetting the .htaccess File
- Adjusting File Permissions
What Triggers the ‘Sorry, You Are Not Allowed to Access This Page’ Error in WordPress?
We have occasionally encountered this error on our sites and while assisting readers with their troubleshooting efforts. It typically arises when your WordPressUser Role (the permissions assigned to your account) does not grant you access to a specific section of the admin dashboard.
For instance, an author can only modify their own articles. If someone provides them with a direct link to edit another author’s article, they will encounter the message, ‘Sorry, you are not allowed to access this page.’
However, the situation can become confusing: sometimes, this error appears even when you should have the necessary access. This can be quite frustrating.
If you are not the site owner or an administrator,you will need to reach out to someone who holds those roles. They can clarify why you lack access or adjust your user role if necessary.
If you are the site owner or administrator,and you still encounter this error upon logging in, it indicates that something has gone awry behind the scenes—typically related to user permissions or a recent update.
Potential causes include a failed WordPress update, a malfunctioning plugin, a conflict with your theme, or an issue with server configuration concerningFile Permissions (the server-level settings that dictate who can read, write, or execute files).
The frustrating aspect is that you cannot resolve this issue directly from the WordPress dashboard. You will need to utilize FTP or access your database directly.
This can be daunting if you are new to WordPress, and making an incorrect change can lead to larger issues. Therefore, we highly recommend creating a complete backup of your website before proceeding with any modifications.
If you prefer not to modify the files yourself, consider contacting your hosting provider for assistance. They can help resolve the issue more quickly.
Here are some effective solutions to troubleshoot and resolve the ‘Sorry, you are not allowed to access this page’ error in WordPress:
- Verify Your WordPress User Role
- Inspect for a Damaged .htaccess File
- Examine File Permissions for Accuracy
- Switch to the Default Theme via FTP
- Disable All Plugins
- Review Your WordPress Error Logs
- Upgrade to the Latest PHP Version
- Restore Your Most Recent Backup
- Check and Modify Your Database Prefix
- Reach Out to Your Hosting Provider
- Video Guide
- Discover Additional Solutions for Common WordPress Errors
1. Verify Your WordPress User Role
If you can access the WordPress admin dashboard but are unable to view certain pages, your user role may have changed, and you might no longer have admin privileges.
Note:If you are unable to access the ‘Users’ menu, proceed to the next step. You can also use phpMyAdmin to manually reset permissions if you are completely locked out.
To check your user role in the WordPress dashboard, follow these simple steps:
- Go to the Users » All Users section in your sidebar.
- Find your username in the list.
- Check the Role column to confirm it displays ‘Administrator.’
If you cannot access the Users page, it indicates that you do not have administrator privileges.
If your administrator account was deleted or your user role was altered, you can create a new admin user using phpMyAdmin.
2. Verify if the .htaccess File is Corrupted
If you have an admin role but still encounter the message ‘Sorry, you are not allowed to access this page,’ the issue might be due to a corrupted .htaccess file. You can check this by renaming the file.
Use an FTP client like FileZilla or the file manager in your WordPress hosting account. If you’re unfamiliar with FTP, consider reviewing our guide on how to use FTP for uploading files to WordPress.
- Connect to your website using your FTP client.
- Go to the root directory (typically labeled as public_html).
- Locate the file named
.htaccess. - Right-click on the file and rename it to
backup of .htaccesscurrent directory
If you cannot locate your.htaccessfile, please refer to our guide on locating .htaccess in WordPress.
After renaming the file, attempt to log in to your WordPress site to check if the issue is resolved. If it is not, rename it back to.htaccessand proceed to the next step.
If you can access your account, then the issue has been resolved. The next step is to create a new.htaccessfile. To do this, go to theSettings » Permalinkssection in WordPress.
Simply click the Save Changes button at the bottom of the page, and WordPress will create a new.htaccessfile.
3. Verify File Permissions
While your FTP client is open, let’s ensure there are no issues with your file permissions. File permissions determine who can access files and folders on your website.
The following settings are recommended for most users:
- 755for all directories and subdirectories.
- 644for all files.
Here’s how to correctly apply these settings using FTP:
- Go to your root directory and select the
wp-admin,wp-content, andwp-includesfolders. - Right-click and choose ‘File permissions…’.
- Input 755 in the numeric value field.
- Check ‘Recurse into subdirectories’ and choose ‘Apply to directories only’.
- Click OK to save the changes.
This will open the file permissions dialog box.
Now, enter 755 in the numeric value field. Then, check the ‘Recurse into subdirectories’ option and select ‘Apply to directories only’.
Click the ‘OK’ button to proceed. Your FTP client will begin adjusting file permissions for folders and sub-folders. Please wait for the process to complete.
Next, select all files and folders in the root directory of your WordPress site, then right-click to access the file permissions dialog.
The file permissions dialog box will appear.
Enter 644 in the numeric value field and click ‘OK’ to proceed.
Your FTP client will now start applying file permissions to all files on your WordPress site.
After completing this step, attempt to log in to your WordPress site again. If you can access it, the issue is resolved. If you still encounter problems, proceed to the next solution.
4. Activate the Default Theme via FTP
The following solution involves checking whether your current WordPress theme is responsible for the error.
You will need to connect to your website using an FTP client or the file manager provided by your web hosting service. Then, navigate to the wp-content directory.
In this directory, you will find a folder named themes. This folder contains all the themes installed on your WordPress site.
To troubleshoot this issue safely, follow these steps to switch to a default theme:
- Open the
themesdirectory. - Find the folder corresponding to your currently active theme (for example,
astraordivi). - Right-click on that folder and rename it to something like
astra.deactivate.
This action will activate the default WordPress theme (such as Twenty Twenty-Four). Now, try logging in to your WordPress site to check if the issue is resolved.
If you continue to see the message ‘Sorry, you are not allowed to access this page,’ the issue is not related to your theme. You should rename your theme folder back to its original name and proceed to the next step.
If you can log in, it indicates that the previously active theme was the source of the problem, allowing you to begin troubleshooting. Consider switching to a different theme or reinstalling the same theme while ensuring it is configured correctly.
If the error persists, reach out to the theme author for assistance. They may be able to help you resolve the issue or address a bug within the theme.
5. Disable All Plugins
The next step is to determine if a malfunctioning WordPress plugin is responsible for the error. We will do this by temporarily disabling all plugins.
If you’re unsure how to do this without accessing the WordPress admin area, don’t worry. You can easily accomplish this using FTP:
- Connect to the
wp-contentdirectory using your FTP client. - Locate the folder named
plugins. - Rename the folder to
plugins.deactivate.
This action will immediately deactivate all installed plugins. If you can now log in to your dashboard, it indicates that one of the plugins was causing the issue. Rename the folder back to pluginsand then activate them one at a time to identify the problem.
6. Review Your WordPress Error Logs
You might find useful information in an error log regarding what went wrong. Your web hosting provider may maintain logs, or you might have previously configured WordPress to generate them.
You can often locate a debug.log file within your wp-content directory if debugging is enabled. If it isn’t, you can enable it by adding specific code to your wp-config.php file.
For further details, refer to our guide on setting up WordPress error logs or reach out to your hosting provider.
7. Upgrade to the Latest PHP Version
If your WordPress site is using an outdated PHP version, it may lead to issues. Updating to the latest version could resolve these problems.
You can usually update your PHP version directly from your hosting control panel (like cPanel or hPanel) in the ‘PHP Configuration’ or ‘MultiPHP Manager’ section.
For additional information, check our guide on updating your PHP version in WordPress or contact your hosting provider.
8. Restore Your Most Recent Backup
If you’ve recently backed up your WordPress website, restoring it to a previous version can often resolve the ‘Sorry, you are not allowed to access this page’ error.
However, keep in mind that restoring a backup will erase any changes made to your settings and content since the backup was created. That’s why we always advise using a trustworthy backup plugin like Duplicator, which simplifies the restoration process for your site.
For detailed instructions, refer to our beginner’s guide on restoring WordPress from a backup.
9. Verify and Update Your Database Prefix
If you have previously changed your database table prefix in the wp-config.php file, there may be a mismatch between your database prefix and your WordPress installation.
This issue arises because your user role capabilities are stored in the database with a specific prefix (typically wp_ by default).
If the prefix in your configuration file does not match the prefix in your database tables, WordPress may lose track of your administrator privileges, leading to the ‘Sorry, you are not allowed to access this page’ error.
To resolve this, check your database using phpMyAdmin to ensure that the database table names have the prefix specified in your wp-config.php file.
For detailed instructions, refer to our guide on changing the WordPress database prefix.
10. Reach Out to Your Hosting Provider
If you’re unable to resolve the error yourself, contact your WordPress hosting provider to see if they can assist you.
Many hosting companies provide excellent technical support and may be able to resolve the issue on your behalf. For example, providers like SiteGround and HostGator have support teams experienced in handling these specific WordPress errors.
When you reach out to them, ask them toreview the server error logs for 403 Forbidden errors or permission issues. This will help pinpoint the exact file that is causing the problem.
For optimal results, be sure to check our guide on how to effectively request WordPress support.
Discover More Solutions for Common WordPress Errors
Facing other WordPress issues? Explore the guides below for solutions:
- Step-by-Step Guide to Fixing the WordPress White Screen of Death
- How to Resolve the 500 Internal Server Error in WordPress
- How to Resolve the ‘Cookies Are Blocked Due to Unexpected Output’ Error in WordPress
- How to Fix the ‘Briefly Unavailable for Scheduled Maintenance’ Error in WordPress
- How to Resolve the ‘PHP Missing MySQL Extension’ Error in WordPress
- How to Fix the ‘Error Establishing a Database Connection’ in WordPress
- How to Resolve the ‘Are You Sure You Want to Do This?’ Error in WordPress
We hope this guide has helped you resolve the ‘Sorry, you are not allowed to access this page’ error in WordPress. You may also want to bookmark our comprehensive guide on fixing the 403 Forbidden error or learn how to secure your WordPress website.
If you enjoyed this article, please subscribe to our YouTube Channel for WordPress video tutorials. You can also connect with us on Twitter and Facebook.



