+254725682556 +254725052660 [email protected]
Client Area

WordPress

How to Fix "Sorry, You Are Not Allowed to Access This Page" Error in WordPress

This error appears when WordPress recognizes that you're logged in but decides your account doesn't have permission to view the page you're trying to reach, usually wp-admin or a specific admin screen. It's almost always caused by one of three things: a plugin blocking access, a user role that got changed or corrupted, or a server-level restriction in your .htaccess file. Work through the checks below in order, since the first two cover most cases.

Common Causes

  • A security or membership plugin restricting access to wp-admin or the REST API
  • Your WordPress user role was accidentally changed to Subscriber or another low-privilege role
  • A corrupted user capabilities entry in the database after a failed update or import
  • An .htaccess rule limiting wp-admin to specific IP addresses
  • A multisite network restricting admin access to the main site only

Step 1: Rule Out a Plugin

Security plugins (login limiters, firewalls, membership or restriction plugins) are the most common cause. If you can't get into wp-admin at all, you'll need to disable plugins through File Manager instead of the dashboard.

  1. Open File Manager in your hosting control panel and go to /wp-content/.
  2. Rename the plugins folder to something like plugins-disabled.
  3. Try logging into wp-admin again. If you get in, rename the folder back to plugins, then rename each plugin's individual subfolder one at a time, checking the site after each one, until you find the plugin causing the block.
If disabling plugins fixes the error, reactivate the rest from the dashboard and remove or reconfigure the one that caused it. Check its settings for anything related to login restrictions, IP allowlists, or REST API access before deleting it outright.

Step 2: Check Your User Role

If the error only affects one user account, that account's role may have been changed. An Administrator who can still log in should check Users in the dashboard and confirm the affected account still shows Administrator. If no account can access the dashboard at all, you can fix the role directly in the database:

  1. Open phpMyAdmin from your hosting control panel.
  2. Select your WordPress database and open the wp_usermeta table.
  3. Find the row where user_id matches your account and meta_key is wp_capabilities.
  4. Edit the meta_value field so it reads a:1:{s:13:'administrator';b:1;}, then save.
Export a backup of the table before editing it. A typo in this field can lock every account out of the dashboard.

Step 3: Check .htaccess for IP Restrictions

If someone previously restricted wp-admin to specific IP addresses (often done for security) and your IP address has since changed, you'll be blocked out. Open .htaccess in File Manager (you may need to enable Show Hidden Files first) and look for a block like <Files wp-login.php> or Order Deny,Allow with a list of IP addresses. Remove or update it, then try logging in again.

Step 4: Check Multisite Settings

On a WordPress multisite network, a user can be an administrator on one site but not have network-wide access to others. If this is happening on a subsite, log in as the network's Super Admin and check that user's role under My Sites > Network Admin > Users.

If you've worked through all four steps and the error persists, it's worth comparing notes with the plugin disabling steps in how to disable a WordPress plugin manually when you can't access wp-admin.