The WordPress message “Sorry, you are not allowed to access this page” means the current user does not have the capability required for that admin screen. It can appear after a migration, update, plugin change, role modification or database-prefix change.
Start by confirming whether the error affects one user, one admin page or the entire dashboard.
Confirm you are using the correct account
Log out, clear the site’s cookies and sign in with the intended administrator account. If another administrator can access the same screen, compare the two user roles and capabilities.
Do not grant administrator access merely to bypass one error. Use the least privileged role that supports the user’s actual work.
Check whether the screen still exists
A plugin or theme update may rename or remove an admin page. If the error affects only one bookmarked URL, navigate to the feature through the current WordPress menu. The saved URL may be outdated.
Disable the most likely plugin
Role editors, security plugins, membership tools and white-label admin plugins can change capabilities. Deactivate the plugin changed most recently and retest. If wp-admin is inaccessible, rename the plugin folder using cPanel File Manager or SFTP.
Test the active theme and custom code
Custom functions can remove menus or restrict access with capability checks. Disable recent WPCode snippets and test a default theme on staging. Review code using functions such as current_user_can() and filters that alter user roles.
Confirm the database table prefix
During a migration, the value of $table_prefix in wp-config.php must match the database table names. User capabilities are also stored in user metadata keys that include the prefix. A mismatch can make an administrator appear to have no permissions.
Create a database backup before changing prefixes or user metadata. Search-and-replace mistakes in these values can lock out every administrator.
Restore administrator capabilities carefully
If the administrator role or user metadata is damaged, use WP-CLI or the database to restore the correct role. This is a high-impact change, so confirm the user ID, table prefix and current values first. On a managed host, support may provide a safer recovery method.
Check for an incomplete WordPress update
A failed core, plugin or theme update can leave files and database changes out of sync. Complete the update, replace damaged files with clean copies and clear caches. If WordPress is also stuck in maintenance mode, follow my maintenance mode repair guide.
Review Multisite permissions
In WordPress Multisite, site administrators and network super administrators have different capabilities. Confirm the user is assigned to the correct site and that the requested screen belongs to the site or network dashboard.
Check security and firewall rules
If the message appears only for certain admin actions, review security plugin logs and server firewall events. A 403 response from the server is different from WordPress’s capability message. Use my WordPress 403 guide when the server itself blocks the request.
Prevent permission errors
- Maintain at least two verified administrator accounts.
- Document role and capability changes.
- Test migrations and database prefix changes on staging.
- Back up the database before editing users or roles.
- Remove abandoned role-management code and plugins.
The fix should restore the correct capability, not give every user unlimited access. For more related issues, see my WordPress troubleshooting hub.
