Admin login error: Sorry, you are not allowed to access this page
-
My site’s frontend works fine, but I can’t log into the admin at all. When entering my correct details at mysite.com/wp-admin, I get redirected to the homepage. If I then type mysite.com/wp-admin back into the address bar, I get error:
“Sorry, you are not allowed to access this page.”
I have tried all suggested solutions:
1. Disabled all plugins, both by removing the plugins by FTP and also via phpMyadmin (option_value a:0:{} under active_plugins)
2. Reverted to TwentySixteen theme both by removing the custom theme in FTP and also via phpMyadmin (option_value twentysixteen under template and stylesheet). Homepage now loads TwentySixteen theme ok.
3. Cleared browser cookies and even tried different browsers, with cookies disabled.
4. Checked that the administrator role is present in wp-options database table (it is).
5. Cloned whole site by FTP/phpMyadmin onto a different hosting server and domain, in case it was to do with php or other server settings. No difference.
6. Changed my user’s email address in database and then used password reset to have a new password sent.
7. Replaced Authentication Unique Keys and Salts in wp-config.php to forcefully log out all users (in case of hacking).
8. Deleted wp-admin folder and replaced it with a copy from a working site.
9. Deleted .htaccess and replaced it with a copy from a working site.
10. Enabled wp_debug in wp-config.php, no php errors showing.
11. No other errors showing in error_log.
I appear to be completely out of options. I have no recent backup of the site so I can’t roll back to a time when the admin login worked. I haven’t logged in for a few months and at least one automatic update has happened since. I am guessing that’s what caused the problem, but how do I go about fixing it? Or is it now literally just a case of re-installing WP from scratch and re-importing all the content table by table? Because without admin access I can’t even use the export tool. Please help!The page I need help with: [log in to see the link]
- The topic ‘Admin login error: Sorry, you are not allowed to access this page’ is closed to new replies.