Header Text - Fix: Sorry You Are Not Allowed to Access This Page

If you’ve seen the message that says Sorry, you are not allowed to access this page while working on your WordPress site, you may be confused. This error usually appears when WordPress blocks access to a specific part of your dashboard.

It means something is wrong with your permissions, settings, or files, and WordPress no longer believes you should view that page. The worst part? It can lock you out of important areas of your site. You may not be able to update plugins, change settings, or do much in your dashboard. That’s why you need to fix this problem as soon as possible.

This guide explains what causes the error, why this happens and how to fix it. Don’t worry, you don’t need to be a tech expert. We’ll keep the steps simple and clear. By the end, you’ll know exactly what to do to get access and keep your site running smoothly.

KEY TAKEAWAYS

  • This error means WordPress is blocking your access to a specific part of your site.
  • Wrong user roles, plugin conflicts, file permission issues, or broken settings can cause this error.
  • Always back up your site before fixing anything.
  • Use FTP or File Manager if you are unable to access the WordPress dashboard.
  • Deactivate all plugins to see if one is causing the issue.
  • Change to a default WordPress theme to rule out theme-related problems.
  • Ensure your user account still has administrator permissions.
  • Check your error logs to find hidden issues or file problems.
  • Ensure the database prefix in wp-config.php matches your database tables.
  • Fix any mistakes in the wp-config.php file and save it again.
  • Upgrade to the latest PHP version; WordPress supports this for better performance.
  • Set correct file permissions for all your site files and folders.
  • Regenerate your .htaccess file to fix rules that may be blocking access.
  • As a last option, reset your WordPress site to start fresh if nothing else works.

Understand Error & Possible Reasons Behind It

The WordPress Sorry, you are not allowed to access this page error means that your site is blocking you from viewing a specific part of the dashboard, even if you are the site admin. It’s a security feature, but sometimes it gets triggered by mistake.

You may see this error after updating WordPress, switching themes, changing a plugin, or Understanding WordPress User Roles: A Guide for Website Owners. It can also appear if you’re trying to reach a page that your current user role isn’t permitted to view. In some cases, the problem starts right after How to Migrate a WordPress Site to a New Host or Domain or making changes to core files.

When this happens, you’re usually stuck and can’t manage your site the way you need to. That’s why you need to find the cause and fix it fast.

Common Causes

Let’s consider what may trigger the Sorry, you are not allowed to access this page error:

  • User Role Issues: If your account’s role was changed or the permissions were edited by mistake, you may lose access to admin features. Even site admins can encounter this issue if the user role settings become corrupted.
  • Plugin or Theme Conflicts: Some plugins or themes may not work well together. A recent update or a new install could cause a conflict that blocks your access. This is common when plugins control permissions or user access.
  • File Permission Errors: Every file and folder on your server includes permission settings. If these are set incorrectly, WordPress may be unable to read certain files, which can stop you from accessing parts of the dashboard.
  • Database Prefix Mismatch: Your WordPress database tables have a prefix (like wp_). If the prefix in your wp-config.php file doesn’t match the database, WordPress can’t find the right data and might block access.
  • Corrupted .htaccess File: The .htaccess file controls important site settings. If it’s damaged or has the wrong rules, it can interfere with how WordPress handles permissions and pages.
  • Outdated PHP Version: If your site is running an older version of PHP that WordPress no longer supports, it may cause strange errors, including access issues.
  • Modified wp-config.php File: This file contains key settings for your site. If it has been edited incorrectly, it could break how WordPress handles user access or database connections.

Each of these issues can lead to the same error, but the fix depends on what caused it. In the coming steps, we’ll show you how to find the problem and solve it.

10 Ways to Fix: Sorry, You Are Not Allowed To Access This Page

Before you start fixing anything, it’s a good idea to take a few safety steps. That way, if something goes wrong during troubleshooting, you won’t lose your site data.

First, How to Backup Your WordPress Site: A Comprehensive Guide. This includes your WordPress files and your database. If you use a backup plugin, now’s the time to run it. However, if your host has automatic backups, verify that the latest one is available and functioning properly.

Since this error can block you from logging in to the WordPress dashboard, you may need to access your site in another way. One option is WordPress And What Does FTP Stand For: A Beginners Guide, which lets you connect to your site’s files. A popular and free tool for this is Download FileZilla. You’ll need the FTP login details from your hosting account to get started.

To manage your site’s database, you can use phpMyAdmin. Most hosts include this in the cPanel dashboard. It’s useful for checking user roles and database table prefixes, especially when are unable to log in to WordPress. Both FTP and phpMyAdmin are essential when the usual admin access isn’t working properly.

Here are the solutions’ step by step.

Restore a Previous Backup

If you already have a backup from before the error occurred, restoring it is often the fastest way to get your site back to normal. This will revert everything to the state it was in when it was working correctly. For step-by-step guidance, refer to this tutorial: How to Restore WordPress from a Backup: Best Practices

Expert Tip: Ensure the backup is recent, as you may lose new content or settings. If your backup is too outdated, consider trying the other solutions first before restoring everything.

Deactivate All Plugins

Sometimes, a plugin can cause conflicts that lead to the Sorry, you are not allowed to access this page error. To find if a plugin is the problem, you’ll need to disable all of them. Since you may not be able to WordPress Login URL How to Find, Protect and Change It, the best way to do this is through FTP.

First, How To Configure A Site In FileZilla. Once you’re in, go to the public_html/wp-content/ folder. Inside that is a folder called plugins. Right-click on it and rename it to something like plugins-disabled. This tells WordPress to stop loading any plugins.

Fix: Sorry, You Are Not Allowed To Access This Page - Disable All Plugins Using FileZilla

After renaming the folder, try visiting your WordPress Admin Dashboard Tips for Accessing and Using WP Admin once more. If the error goes away, then one of the plugins was the cause.

To find out which one, go back to your FTP client and rename the folder plugins. Then, open the folder and rename each plugin folder inside it one at a time. For example, rename just one plugin and reload your site to see if the error returns. This helps you figure out which plugin is causing the problem.

Fix: Sorry, You Are Not Allowed To Access This Page - Disable One Plugin at a Time Using FileZilla

Once you find the one breaking your site, you can delete it or look for an update or alternative. If you disable a plugin by renaming its folder, but the error still appears, ensure you change the folder name back to its original before renaming the next plugin. Doing so will help you identify the real culprit.

Switch to a Default Theme

Sometimes, the theme you’re using can cause conflicts that lead to access errors in WordPress. To check if your theme is the problem, it’s a good idea to temporarily switch to a default WordPress theme (Twenty Twenty-One or Twenty Twenty-Three). If the error disappears after switching, then your theme is likely the cause.

However, if you can’t access your WordPress dashboard, you can do this using FTP. Here’s how:

Go to the directory, public_html/wp-content/themes/ where you’ll see a list of installed themes. Ensure at least one default theme is available. If you don’t see one, you can download a default theme from WordPress.org and upload it to this folder.

Now, find your current active theme and rename its folder. For instance, you may change Astra to Astra-Old. Now, WordPress will no longer be able to load it, so it will fall back to one of the default themes automatically.

Fix: Sorry, You Are Not Allowed To Access This Page - Rename Active Theme’s Folder to Switch to Default Theme

After renaming the theme, try logging in to your site again. If the error disappears, your theme is the problem. You can either look for an update or How to Install WordPress Themes: A Beginner’s Guide that works well with your setup.

Verify User Roles & Permissions

If you’re here, it’s likely your WordPress account doesn’t have the correct permissions, which leads to the Your access to this site has been limited by the site owner error, even if you’re supposed to be admin.

This occurs when roles are inadvertently changed, typically after a plugin conflict or database issue. In this case, you’ll need to check your user role and ensure you still have administrator access.

Here’s how to do this using the Hosted.com cPanel:

Go to cPanelDatabasesphpMyAdmin. Then, click your The Basics of MySQL and WordPress Database Management and look for the table that ends in _users. For example, wp_users.

Fix: Sorry, You Are Not Allowed To Access This Page - Open Users Table Using phpMyAdmin

Now, find your username in the list and take note of your ID number.

Fix: Sorry, You Are Not Allowed To Access This Page - Note User ID

After that, go to the _usermeta table (it may be called wp_usermeta) and browse the rows until you find one with the meta_key labeled wp_capabilities. This row indicates the role assigned to your user account.

If you’re an Administrator, the meta_value should look like this:

a:1:{s:13:"administrator";b:1;}
Fix: Sorry, You Are Not Allowed To Access This Page - Confirm If You’re Administrator

However, if the value is something else, click Edit next to that row and change it. This will restore your account to admin rights.

But if you would rather create a new admin user from scratch, that works too. Here’s how:

Go to wp_users in phpMyAdmin. Click Insert at the top.

Fix: Sorry, You Are Not Allowed To Access This Page - Insert New User to Database

Fill in the fields for your new user account (username, password, email, etc.), then, click Go. The new user will be added to the table. Now, note the ID number assigned to this new user, as you need it in the next step.

Return to the wp_usermeta table and click Insert again. Fill out the fields like this:

  • unmeta_id: Leave this blank (phpMyAdmin fills it in automatically).
  • user_id: Enter your new user’s ID.
  • meta_key: Type wp_capabilities.
  • meta_value: Use a:1:{s:13:”administrator”;b:1;}

Once you’re done, you should be able to log in using the new admin account. After that, go to your dashboard, fix your original account, and either return its admin rights, or delete it if you no longer need it.

WordPress Hosting is built to deliver speed, security, and simplicity for growing websites.
With features like automated plugin updates, built-in caching, and a free SSL certificate, your site stays protected and performs at its best.

Check Error Logs

When something unexpected happens on your WordPress site, error logs can help you figure out what’s causing the problem. These logs track issues that occur behind the scenes, including problems with plugins, themes, file permissions, or server settings.

To start, find your site’s error logs. Most web hosts store them in your hosting account. If you’re a Hosted client, go to cPanel Metrics Errors.

Fix: Sorry, You Are Not Allowed To Access This Page - Check Error Logs Using cPanel

Alternatively, you can How To Use cPanel File Manager to check the error_log file inside your WordPress installation folder.

Fix: Sorry, You Are Not Allowed To Access This Page - Check Error Log Using File Manager

However, if debugging is enabled in WordPress, you can also check the wp-content/debug.log file. If you wish to turn on debugging, open your wp-config.php file and add these lines if they’re not already there:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

Once that’s set, WordPress will record issues into the debug.log file whenever something goes wrong. To learn more about debugging, refer to the following tutorial: WordPress Debug Mode: How to Enable It & Fix Errors

Now, open the log file and look for any error messages that mention permission denied, cannot access, or user role. These messages can help you figure out what’s blocking your access.

For example, you may see an error relating to a plugin or theme file. That tells you where to start fixing the issue. Or, if the error mentions a missing file or broken database call, you’ll know what needs to be restored or checked next.

You may consider reading error logs to be technical, but they’re one of the most useful tools for finding hidden issues, especially when you’re not sure what triggered the error message on your screen.

Review wp-config.php for Errors

The wp-config.php file is one of the most important files in your WordPress site. It controls how WordPress connects to your database and includes other key settings. If there’s a mistake in this file, such as:

  • A missing line.
  • An extra space.
  • The wrong value.

You could receive the Sorry, you are not allowed to access this page error.

To check the file, connect to your website using an FTP client or open the File Manager in your hosting control panel. Find wp-config.php in the root directory. Download a copy to your local computer, just in case you need to restore it later.

Now, open the wp-config.php file in a plain text editor (you can make direct edits if opening this file using File Manager). Look for anything that seems out of place, such as:

  • Missing or extra semicolons or quotes.
  • Incorrect database name, username, or password.
  • Wrong table prefix (the value of $table_prefix).
  • Misplaced code added by a plugin or third-party service.

Be careful not to remove or change anything until you are sure. Even a small mistake can cause a bigger error. If you’re unsure what’s wrong or you edited the file recently, the easiest fix is to restore it from a backup. Use the version that worked before the error appeared. Replace the current file with the backup using FTP or your File Manager.

Update PHP Version

WordPress runs on PHP, the programming language behind your site. If your server is using an outdated PHP version, it can cause errors, including Sorry, you are not allowed to access this page. WordPress performs best with the latest versions of PHP, so keeping it updated is vital for performance and security.

Here’s how to check your current PHP version and update it using the Hosted.com control panel:

Go to cPanel Software Select PHP Version.

Fix: Sorry, You Are Not Allowed To Access This Page - Select PHP Version

It will show the version that’s currently active on your server. Currently, WordPress recommends using PHP 7.4 or later.

Fix: Sorry, You Are Not Allowed To Access This Page - WordPress Recommended PHP Version

If your site is still on an older version, you need to upgrade it. Just choose a newer version from the dropdown and click Apply to save the changes.

Fix: Sorry, You Are Not Allowed To Access This Page - Upgrade PHP Version

Before switching, ensure your themes and plugins are compatible with the new PHP version. Most popular plugins work fine, but it’s a good idea to back up your site first, in case anything breaks after the update.

Once you upgrade PHP and reload your site, check if the error is gone. If it persists, go to the next solution.

Set Correct File Permissions

WordPress needs the right file and folder permissions to run smoothly. If those permissions are set incorrectly, WordPress may block access to important areas, resulting in a Sorry, you are not allowed to access this page error.

Each file and folder on your site includes a permission level that determines who can read, write to, or modify it. If these levels are too open, your site becomes vulnerable to security risks. If they’re too strict, WordPress can’t do what it needs to.

Here are the recommended settings:

  • Folders should have permissions set to 755.
  • Files should have permissions set to 644.

To fix permissions, go to the public_html or the folder where WordPress is installed. Right-click on a wp-content folder and choose File permissions.

Fix: Sorry, You Are Not Allowed To Access This Page - Open File Permission Settings for Folders

Enter 755, check the box that says Recurse into subdirectories, and Apply to directories only. After that, click OK.

Fix: Sorry, You Are Not Allowed To Access This Page - Set Directory Permission

Next, right-click the same folder, choose File Permissions, enter 644, and this time, click apply to files only. Now, repeat this for the wp-admin and wp-includes directories (you can set permissions in bulk).

Once all permissions are set correctly, try to revisit your site. If incorrect permissions were the cause, this should resolve the access issue. Keeping file and folder permissions correct helps your site stay both secure and functional.

Regenerate .htaccess File

The .htaccess file helps control how your WordPress site talks to the server. It handles redirects and permalink settings. If this file contains incorrect code or is corrupted, it can lead to errors, including Sorry, you are not allowed to access this page.

To fix this, you’ll need to replace the current .htaccess file with a clean one. Here’s how to do it using the Hosted.com File Manager (however, you may use an FTP client if you want to):

Navigate to cPanel Files File Manager. Click public_html. Look for a file named .htaccess. If you don’t see it, ensure hidden files are visible in your settings. Now, right-click on .htaccess and rename it .htaccess-old. This disables the current file without deleting it.

Fix: Sorry, You Are Not Allowed To Access This Page - Rename .htaccess File

Next, log in to your WordPress dashboard. If the error is gone, that’s a good sign. Now, go to Settings Permalinks and click Save Changes. WordPress will now automatically make a new .htaccess file with the correct default settings.

Fix: Sorry, You Are Not Allowed To Access This Page - Save Permalink Settings without Make Any Changes

This step is quick but powerful. A fresh .htaccess file can fix issues caused by corrupted rules or plugin conflicts. If you still can’t access your dashboard, you can also manually create the file by copying and pasting the default WordPress code into a new .htaccess file.

Reset WordPress Site

If nothing else works and you’re still stuck with Sorry, you are not allowed to access this page, resetting your WordPress site can be a last resort. This step removes all custom content, plugins, and themes, reverting your site to a fresh installation. It’s like starting over, but sometimes, it’s the cleanest fix.

Before you do this, ensure you’ve created a full backup of your site. That way, if you change your mind later, you can restore your old content.

If you wish to dive deeper and learn the best practices, risks & considerations before resetting, and what to do after reset, click the following link: How To Reset WordPress Site & Start From Scratch

However, if you’re working with a WordPress Multisite Setup & Installation Guide, you need to reset each subsite individually.

Remember, resetting deletes your current content and settings, but keep your login details the same.

Strip Banner Text - Improve your website experience with Hosted.com's WordPress Hosting. [More Info]

FAQS

Why am I seeing this error even though I’m the admin?

This typically occurs when your user role changes, or your permissions are altered. It can also occur if a plugin, theme, or database issue blocks admin access. You’ll need to check your user role in phpMyAdmin to ensure you still have administrator rights.

Is it safe to reset my WordPress site?

Resetting is safe if done correctly, but it removes your content, themes, and plugins. Use it only as a last resort and always back up your site before performing a reset.

Will updating PHP delete my website data?

No, updating your PHP version won’t delete your files or content. It simply improves how your server runs your WordPress site. Still, it’s smart to create a backup before updating, in case something goes wrong.

What does ‘HTTPS user login not allowed from here’ mean in WordPress?

The message HTTPS user login not allowed from here usually appears when your server blocks remote or unauthorized login attempts for security reasons. It can happen if you’re trying to access your WordPress dashboard from a restricted IP, through an unusual method, or using a tool that your hosting provider doesn’t allow. To resolve the issue, try logging in from a different network or contact your hosting provider to whitelist your IP address or adjust the server settings.

How can I avoid this error in the future?

Keep your plugins, themes, and WordPress core updated. Use reliable plugins and themes, regularly check file permissions regularly, and always back up your site before making major changes. This helps prevent errors and makes recovery easier in the event of a breakdown.

How To Remove “Powered By WordPress” From Website

How To Undo Changes In WordPress: Pages, Posts & Revisions

How To Troubleshoot & Fix Common WordPress Issues

WordPress Anchor Links: Easy Manual & Automatic Setup

How To Remove Query Strings From Static Resources In WordPress