Fixing the WordPress error ‘sorry you are not allowed to access this page’

Problem symtoms:

  • On a WordPress site logged in as site admin to be presented with ‘Sorry you are not allowed to access this page‘ error message.
  • Other weird symptoms: no side menu, but could access some admin pages normally by typing the url directly, eg ‘wp-admin/users.php’ to access the list of users (side menu re-appeared for these but was missing the Dashboard menu item). Could edit other user’s profiles but not my own.

The solution:

  • After wasting hours trying all solutions listed online, including: disabling all plugins, using a default theme, checking file-permissions, resetting .htaccess etc, etc., I tracked the issue down to a problem with the wp_user_roles field in the WordPress database.
  • After trying to manually fix the permissions without success, I came across a plugin that was able to fix everything.
  • PublishPress have an excellent plugin called ‘PublishPress Capabilities’ that fixed the error message (and bought the side menu and Dashboard options back) just by installing the free version of plugin.
  • However, to rid the site of the problem permanently it was necessary to restore the default WordPress user permissions. Fortunately the free version of the PublishPress plugin can do this for you, but be sure you’ve backed everything up before doing this and try at your own risk.
  • In the PublishPress plugin screen go to ‘Capabilities > Backup’, click the ‘Reset Roles’ tab and then click the button ‘Reset to WordPress defaults’.
This entry was posted in Computer Gremlins, Computing, WordPress and tagged . Bookmark the permalink.

Leave a Reply