简体   繁体   English

wp-admin:对不起,您不能访问此页面 - Wordpress

[英]wp-admin: Sorry, you are not allowed to access this page - Wordpress

So im having some problems to login after tranfer from Windows hosting to Unix. 所以我在从Windows托管转移到Unix后登录时遇到一些问题。

When im trying to login to admin panel i see this: 当我尝试登录管理面板时,我看到:

Sorry, you are not allowed to access this page

I have used google, search and etc. All what was written in posts doing for me nothing, like disable plugins, change theme and so on, im still having this problem. 我用谷歌,搜索等等。所有写在帖子里的东西都没有,比如禁用插件,更改主题等,我仍然有这个问题。 I have asked hosting company, they have told me this: 我问托管公司,他们告诉我这个:

The problem is caused by the fact that you created multisite and most likely made confusion in the privileges. You'd better turn to the wordpress programmer

But the thing is that i have not created multisite, only installed the language plugin(WPML). 但问题是我没有创建多站点,只安装了语言插件(WPML)。

DEBUG and error showing me nothing. DEBUG和错误显示我什么都没有。

This is basically permission issue. 这基本上是许可问题。

You need to do the following, 你需要做以下事情,

find foldername -type d -exec chmod 755 {} \;
find foldername -type f -exec chmod 644 {} \;

Change the files permission to correct ones , 644 for files and 755 for folders. 将文件权限更改为正确文件,文件为644,文件夹为755。

编辑current_user_can函数是/var/www/html/wp-includes/capabilities.php并添加if(is_admin())返回true;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM