10 Easy Fixes for ‘Sorry You Are Not Allowed To Access This Page’ Error
Bulletproof Backups for Your WordPress Website
Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.
You’ve just sat down to tweak things on your WordPress site. Maybe you’re eager to see how your latest post is doing with readers.
Or you’re excited about a new plugin or theme you just added, wanting to view it live.
But then, without warning, an unwelcome message pops up: “Sorry you are not allowed to access this page.”
This common WordPress error usually appears at the most inconvenient moments. Suddenly, you’re shut out, even if you’re the one who runs the site. It feels like being locked out of your own home without knowing why. But don’t worry—there are a variety of ways to get back in.
TL;DR: If you face the “Sorry you are not allowed to access this page” error on WordPress, start by refreshing the page. You can also clear your browser cache. Next, look into your plugins, themes, file permissions, and database settings. Always backup your site before making any adjustments. To block unauthorized modifications in the future, use a robust security plugin on your site.
Just remember, before trying any solution, always backup your site. This way, you can safely revert any changes if necessary.
1. Start with the basics
When you face the “Sorry you are not allowed to access this page” error in WordPress, it’s smart to start with basic troubleshooting. Often, easy solutions can fix the issue.
Begin by refreshing the page; sometimes that’s all you need.
If that doesn’t help, clear your browser’s cache and cookies. This can clear outdated information that might be behind the error.
Try using another browser to see if the issue continues.
If you think it could be a network problem, switch to a different network, like using mobile data. This might let you get past some hidden blocks.
Finally, take a look at your WordPress site’s error logs. They can provide more insight into what’s causing the problem. If these don’t solve it, you can move on to other strategies.
2. Check your plugins
Plugins can be a reason for the “Sorry you are not allowed to access this page” error. If you noticed this error after adding a new plugin, try disabling it to see if that fixes the issue. For that, you must rename the plugin’s folder in the plugins directory. You can do this by using FTP or your web host’s file manager, like cPanel.
If the error appeared after updating plugins, there might be conflicts between them. In this situation, disable all plugins using FTP or your file manager. Then, reactivate them one by one, checking each time to see if the error occurs again. This helps identify the problematic plugin.
Once you’ve found the troublemaker, look for a similar plugin to replace it. Also, inform the plugin developers about the issue so they can address and solve the problem.
3. Activate a default theme
Switching your WordPress theme or adding a new one from a different source might lead to the “Sorry you are not allowed to access this page” error. This can happen if the new theme isn’t fully compatible with your site.
To see if the theme is the culprit, try reverting to a default WordPress theme like Twenty Twenty-Two. You can do this through phpMyAdmin.
First, log into phpMyAdmin and locate your database.
Search for the table named wp_options.
Find the rows for template and stylesheet. Change their values to the name of a default theme, such as twentytwentytwo.
This action should switch your site to a default theme and might help restore access. If this works, it confirms that your original theme was causing the problem.
4. Check file permissions
Incorrect file permissions can also trigger the “Sorry you are not allowed to access this page” error. This may occur if you or a plugin changed the permissions.
To fix this, you need to verify your WordPress site’s file permissions. Use FTP or your web host’s file manager to access your site files. Review the permissions for each file and directory.
Set the permissions for directories (folders) to 755. For individual files, adjust them to 644. These settings ensure your site functions properly and block unauthorized changes. After making these adjustments, see if the error goes away.
5. Check your site’s database prefix
The “Sorry you are not allowed to access this page” error might occur if the database prefix doesn’t align with what’s in your wp-config.php file. This issue often appears during site migration or when merging a staging site with a live site.
To check this, access your wp-config.php file using FTP or your web host’s file manager. Look for the database prefix, which typically appears as $table_prefix.
Then, log into phpMyAdmin and check your database to find the prefixes used for your tables.
Ensure the prefix in wp-config.php matches the one in the database. If they don’t, edit the wp-config.php file to reflect the correct prefix.
Always backup your site before making any changes, to have a safety net if needed. For smooth site migrations, consider using tools like MigrateGuru. For dependable staging sites, try BlogVault.
6. Ensure you are an administrator
The “Sorry you are not allowed to access this page” error might occur if WordPress cannot recognize you as an administrator on your site. This can prevent you from entering your wp-admin dashboard.
To investigate, use phpMyAdmin to view your site’s database.
Find the users table, typically named wp_users.
Then, check the wp_usermeta table to see the roles assigned to users.
Ensure your user role includes administrator rights. The wp_capabilities field should be set to a:1:{s:13:"administrator";b:1;}
and the wp_user_level field should be 10
.
If you’re not listed as an administrator, ask another admin to upgrade your user role.
If that’s not possible, you can adjust the role yourself in phpMyAdmin. Find your user ID in both tables and update the role as described above. This will restore your administrator status. Be cautious with these changes to prevent errors.
7. Update to the latest PHP version
WordPress runs on PHP. So using an outdated PHP version can lead to the “Sorry you are not allowed to access this page” error. To ensure your site performs well, check if your PHP version is up-to-date.
To do this, log into your hosting account and find the PHP settings. Most hosts display the current version and offer an option to update PHP.
Always backup your site with tools like BlogVault before making any changes. This safeguards your data in case something goes wrong.
Even if updating PHP doesn’t resolve the error, you should keep your version current. This is because newer editions include essential security and bug fixes.
8. Check for changes to core WordPress files
The “Sorry you are not allowed to access this page” error might might be caused by changes to core WordPress files. This includes files such as .htaccess or wp-config.php. This error could also appear if these files get corrupted. This could happen for various reasons. You might have accidentally modified the code. Or perhaps you installed a plugin that modified these files. Even a hacker could change them to block your access to the site.
To check these files, use FTP or your web host’s file manager to access them. Then, open them to search for any suspicious or unfamiliar code.
If you identify an issue with the .htaccess file, you have two options. You can replace it with the default .htaccess code, but this will erase any custom settings.
Or, you can rename the .htaccess file to disable it. If you can access your wp-admin dashboard now, reset your permalink settings to generate a new .htaccess file.
For wp-config.php, there isn’t a default version to revert to. Instead, restore this file from an earlier backup of your site.
Additionally, use file integrity monitoring tools to prevent hackers and unauthorized changes in the future.
9. Restore your site
If you’re dealing with the “Sorry you are not allowed to access this page” error, restoring your site from a backup might help. If you have recent backups, use them to revert your site to an earlier version. This can reverse recent changes that may have caused the issue.
But, remember that restoring your site will remove any new content, products, or updates added after the backup. Before deciding, weigh the pros and cons and be sure you have the latest backup available.
We recommend using BlogVault for this task. It automatically backs up your site and stores the backups off-site in an encrypted format. This keeps your site data secure while preserving site resources. If anything goes wrong, its one-click restore feature makes recovering your site hassle-free.
10. Contact your web hosting provider
Have you tried every solution and still can’t fix the “Sorry you are not allowed to access this page” error? It might be time to contact your web hosting provider. They often have WordPress experts on staff who can assist in resolving the issue.
Your hosting provider’s support team has access to server settings and logs that you may not have. They can spot issues that are difficult to detect on your own. Then, they can offer solutions tailored to your hosting environment. Don’t hesitate to reach out to them; their expertise can help get your site back on track quickly.
What causes the ‘Sorry you are not allowed to access this page’ WordPress error?
The “Sorry you are not allowed to access this page” message acts more like a security alert than a standard error. For this article, we’ll refer to it as an error when discussing solutions. This message indicates you lack the necessary permissions to access that page.
If you’re an administrator, you should have full access to your site. So if you are facing this message, something’s wrong. But if you’re not an admin, you might need to request access from the site administrator.
This issue can occur if WordPress doesn’t recognize you as the admin. It might also result from problems with WordPress core updates, plugins, themes, or incorrect site settings. Typically, this error blocks access to your wp-admin dashboard. So most solutions involve working externally via FTP, your web host’s file manager, or phpMyAdmin.
How to prevent the ‘Sorry you are not allowed to access this page’ error?
It is not difficult to prevent the “Sorry you are not allowed to access this page” error. You can take a few proactive steps that help keep your WordPress site secure and this error at bay.
- First, use a security plugin. It protects your site from hackers and prevents unauthorized changes to your files.
- Make sure to backup your site regularly. This gives you a safety net if something goes wrong. BlogVault can manage this for you, ensuring your data remains secure.
- Conduct regular site audits. Check for changes to files and review their permissions. Also watch for suspicious activities like unauthorized installations.
- Keep everything on your site updated. This means updating the WordPress core, plugins, themes, and any other related software.
- Create staging sites to test updates before implementing them on your live site. BlogVault provides staging sites that can be easily merged with your live site after testing.
- When moving your site to a different host, rely on dependable tools like MigrateGuru. This helps avoid any problems that might arise during the migration process.
Final thoughts
Fixing the “Sorry you are not allowed to access this page” error on WordPress can seem tough. But with the right steps, you can get back to your site. Start with easy checks and then try more detailed solutions if needed. Remember, it’s important to take your time and not rush. Find out what caused the problem so it doesn’t happen again.
To keep your site safe in the future, use a plugin like BlogVault. It automatically saves your site’s data in an off-site location in an encrypted format. This keeps your data safe without slowing down your site. BlogVault also has a simple one-click restore feature, so you can fix your site without a lot of steps. If your site crashes, BlogVault’s emergency connector tool can bring it back in just a few minutes. With these features, BlogVault helps make sure your site stays safe and works well.
FAQs
How to fix sorry you are not allowed to access this page in WordPress?
To fix the “Sorry, you are not allowed to access this page” error in WordPress, start by refreshing the page. You can also try clearing your browser’s cache and cookies. If that doesn’t solve the problem, disable any recent plugins or themes using FTP to see if there’s a conflict. Check if the database prefix in wp-config.php matches the one in your database. Make sure your user role is set as an administrator in phpMyAdmin. Also, update your PHP version and check if core files like .htaccess have been modified. If none of these work, restore your site from a backup or contact your web hosting provider for help. Always remember to back up your site before you begin any fixes.
Why can’t I access my WordPress login page?
If you can’t access your WordPress login page, there could be a few reasons. Check for a plugin or theme conflict by disabling them using FTP. Your site’s file permissions might have changed, making the login page unavailable. Sometimes, your IP address may be blocked, so try using a different network. An incorrect database prefix or a changed URL in the settings could also be the culprits. There’s also a chance your site has been hacked, stopping access. Begin by clearing your browser cache and cookies. Contact your hosting provider for help if needed. Regularly backing up your site can help prevent more issues.
How do I clear the WordPress cache?
To clear the WordPress cache, first find out if you have a caching plugin, like W3 Total Cache or WP Super Cache. Go to your WordPress dashboard, locate your caching plugin, and use its option to clear the cache. Most caching plugins have a clear cache button on the main settings page. If you’re using a managed hosting provider like SiteGround or Bluehost, check their control panel for a caching option and clear it there. Also, clear your browser cache to make sure you’re viewing the latest version of your site. Afterward, check your site to confirm that the changes have been made.
Tags:
Share it:
You may also like
WordPress Update Failed? Here’s Your Step-by-Step Solution
You’re in the middle of updating your WordPress site when, all of a sudden, the screen shows that dreaded message: “Update Failed.” This can leave you scratching your head, wondering…
Multiple Staging Sites in BlogVault: Streamline Website Management with Parallel Testing
Staging sites are the practice arenas for your WordPress sites. They allow you to test changes, try out new features, and fix issues. All this, without disturbing your live website. Think…
8 Ways To Fix WordPress Fatal Error
Encountering this WordPress error can definitely be stressful. The term ‘fatal’ suggests serious problems, even potential data loss. But take a deep breath—your site is neither dying nor beyond repair….
How do you update and backup your website?
Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.
Updating Everything Manually?
But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.
Backup Your WordPress Site
Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.