After 2 weeks not using our WP site, logging into /wp-admin/
gives a whitescreen error:
Sorry, you are not allowed to access this page.
I have:
- renamed
plugins
toplugins.temp
. - created a new admin user via phpMyAdmin. New user has
user_meta
role ofa:1:{s:13:"administrator";s:1:"1";}
. - renamed
themes
tothemes.temp
. - deleted core WordPress files, and replaced with newly uploaded files.
- replaced
.htaccess
with a default version. - CHMOD all folders to 755 and all files to 644 recursively.
- turned on
WP_DEBUG
and found no errors. - confirmed the
site_url
&home_url
are set correctly in the options table of the db.
all without changing the error.
Help appreciated.
Edit:
- I've regenerated the security keys without anything changing.
- The site is singular, not multisite.
- The problem occurs after clearing cookies, and on all devices.
- The error occurs immediately after logging in and reaching
/wp-admin/
. - I can get to
/wp-admin/index.php
but not/wp-admin/
(original error) - I can get to
/wp-admin/plugins.php
but not to/wp-admin/update-core.php
(the first time, the same error), but the second time was okay.
wp_options
table, there are two rows that point to a url, it should be the same url as your domainwp-content/mu-plugins
)? If yes, try renaming the folder. 2) I know you've already tried renaming the themes folder, but I'd still try switching to a default (and unmodified) theme like 2021 and see if the same issue persists. 3) Try installing WordPress (the default setup) in another directory or a subdomain in the same site, and see if logging in gives you the same error in question? 4) "turned on WP_DEBUG and found no errors" - maybe Query Monitor would give you some insights?