How to Fix “Sorry, You Are Not Allowed to Access This Page” in WordPress
Restore access to a WordPress admin page by checking the user role, plugin conflicts, multisite context, database prefix, and capabilities.

This error isn't a server-level 403. WordPress loads fine, then decides your user account doesn't have the capability to open that admin page.
First, confirm what fails. If you can manage posts but can't open one plugin's settings, the problem is probably that plugin — not your whole admin account.
1. Confirm Your Role and Login
Log out. Clear cookies. Log back in.
Go to Users → All Users. Check that your account still has the expected role.
If this is a multisite install, site administrator and network super administrator are different roles. Open the correct dashboard.
Don't grant Administrator access just to fix one permission issue. Use the smallest role that does the job.
2. Check What Changed Recently
Think about the last plugin install, role editor, security change, migration, or update.
A plugin can register its settings page with the wrong capability. Or it can modify an existing role and remove access it shouldn't have touched.
On staging, deactivate all plugins. If access returns, reactivate them one at a time.
Start with:
- Membership plugins
- Role editors
- Security plugins
- White-label plugins
- Admin menu plugins
3. Check the Database Prefix After a Migration
After moving or cloning a site, check that $table_prefix in wp-config.php matches the actual database tables.
User capabilities are stored in user metadata with prefix-dependent keys. If the prefix changed but the old keys stayed, capability lookups fail.
Fixing serialized capability data by hand breaks things. Have a developer or host correct the records.
4. Restore the Missing Capability
If the role itself is damaged, rebuild it with WP-CLI, a trusted role editor, or a small temporary script.
With WP-CLI:
wp cap add editor manage_options
Back up the database first. Remove temporary tools afterward.
WordPress's Roles and Capabilities guide lists which capabilities belong to each standard role.
5. Test With the Affected User
Don't just test with your own account. Log in as the user who had the problem. Confirm the page loads. Confirm restricted pages are still restricted.
A good fix restores the missing access without granting broader permissions to everyone.
Bottom Line
This error usually comes down to one of four things: wrong role, a plugin that changed capabilities, a database prefix mismatch after migration, or a damaged role record. Check in that order. Fix only the capability that's missing.
Share





