问题描述
我是 WordPress Multi-site 的新手,我发现了一个奇怪的问题.
I am new to WordPress Multi-site and I am seeing a weird issue.
我安装了一个新的 WordPress 实例,启用了使用子文件夹的多站点.唯一的问题是当我创建一个新网站时,它没有正确显示并且我无法访问新网站仪表板.
I have installed a new instance of WordPress, enabled multi-site using sub-folders. The only issue is when I create a new website, it doesn't show correctly and I cannot access the new websites dashboard.
我已将这些行添加到 wp-config.php
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', '104.238.186.88');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
.htaccess
RewriteEngine On
RewriteBase /
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
这是一个新建站点的例子,好像只安装了一半?http://104.238.186.88/testing/
Here is an example of a newly created site, it's as if it's only half installed? http://104.238.186.88/testing/
如果您需要更多信息,请告诉我.
If you need any more info please let me know.
谢谢!
推荐答案
您可能需要进行以下更改:
You may need to make the following changes:
define('SUBDOMAIN_INSTALL', false);
在某些托管配置上,它需要:
on some hosting configurations it needs to be:
define('SUBDOMAIN_INSTALL', 'false');
另外,我在这里有点摸不着头脑,因为您没有指定这是根域安装还是子域安装,这两者都可能有自己独特的问题,以及您如何创建新的站点页面"出现在您的仪表板中,但您可以尝试对 .htaccess 文件进行以下更改:
Also, I am kind of shooting in the dark here since you have not specified whether this is a root domain installation or if it is a subdomain installation, both of which potentially have their own unique problems, and how exactly your create new site "page" appears in your dashboard, but you might try making the following changes to your .htaccess file:
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
并更改为:
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) /$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /$2 [L]
这篇关于Wordpress Multisite - 无法访问子文件夹站点仪表板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!