admin管理员组文章数量:1122832
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.
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.
1 Answer
Reset to default 0Because you have renamed the plugin and theme directory, it should a problem on your user. But rename the whole wp-content
directory, so that all add-ons are inactive, check it again.
User Rights
After them, logged in to a database tool, like "Adminer" or "PhpMyAdmin" and look at the table usermeta
with your user ID*, like
SELECT * FROM
wp_usermeta
WHEREuser_id
= '1'`
Check the entries wp_capabilities
and you should have the administrator key, like a:1:{s:13:"administrator";b:1;}
.
*Note: To identify your user ID, look at the frontend, list all your posts and look at the URL, the key ?author=
has your User ID. It is also possible after login in the wp-admin area on links with user keys.
Permalinks
Another chance to fix them is the .htaccess
file. Maybe this is not correct, and you have issues with the permalinks.
本文标签: wpadmin quotSorryyou are not allowed to access this pagequot
版权声明:本文标题:wp-admin: "Sorry, you are not allowed to access this page." 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736293447a1929149.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
wp_options
table, there are two rows that point to a url, it should be the same url as your domain – Buttered_Toast Commented Dec 12, 2021 at 8:23wp-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? – Sally CJ Commented Dec 16, 2021 at 2:55