WordPress MULTISE:wp-admin 403错误

时间:2016-11-20 作者:Pravayest Pravayest

我想使用wordpress multisite。所以我将代码添加到wp config。php:

define( \'WP_ALLOW_MULTISITE\', true );

define(\'MULTISITE\', true);
define(\'SUBDOMAIN_INSTALL\', false);
define(\'DOMAIN_CURRENT_SITE\', \'localhost\');
define(\'PATH_CURRENT_SITE\', \'/multi/\');
define(\'SITE_ID_CURRENT_SITE\', 1);
define(\'BLOG_ID_CURRENT_SITE\', 1);
此外,我还将代码添加到。htaccess文件:

RewriteEngine On
RewriteBase /multi/
RewriteRule ^index\\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) D:/localhost/Multi/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\\.php)$ D:localhost/Multi/$2 [L]
RewriteRule . index.php [L]
此外,我还创建了第二个网站-多/秒,我可以看到第二个网站的前端(帖子/图片…)

但当我尝试使用管理面板-多/秒/wp admin时,我得到

You don\'t have permission to access the requested directory. There is either no index document or the directory is read-protected.

1 个回复
最合适的回答,由SO网友:TrueAlien 整理而成

听起来像是在子目录(/多目录)和本地主机上安装了WordPress?您可以登录主站点管理:/multi/wp admin吗?

错误与“访问请求目录的权限”有关,可能与WordPress设置/配置无关。

再次检查WP安装是否有可能缺少以下步骤(可能导致权限问题):https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian还有这个:https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-debian-7(我完全按照指南执行,在Debian 8.6上激活多站点WP4.7时没有任何错误)