Wordpress 多站点 wp-config-php 配置 [英] Wordpress Multisite wp-config-php configuration
问题描述
质疑好人..首先,我想说我在来这里之前不知疲倦地研究了这个,因为我通常会加强我的学习经验,但现在我需要帮助.有一些帖子和网站接近我的问题,但没有完全解决我的问题.感谢您的帮助.
Question good people..first I want to say that I tirelessly researched this before I came here as I usually do bolster my learning experience but now I need help. There were some posts and websites close to my problem but didn't exactly address my issue. I will appreciate your assistance.
我在自己的目录 (mysite.com/public) 中有一个 wordpress 站点.我最近将其转换为多站点网络.安装很顺利.我的问题是,当我导航到我的网站 -> 网络管理员 -> 仪表板"时,它转到 http://mysite.com/wp-admin/network/ 这给了我一个错误 404.我的主页仪表板包括公共目录:http://mysite.com/public/wp-admin/ 但网络仪表板没有.但是如果我在链接地址中输入 public 这个词 (http://mysite.com/public/wp-admin/network/) 一切正常.
I have a wordpress site in it's own directory (mysite.com/public). I recently converted it into a multisite network. The installation went well. My problem is that when I navigate to "My Sites -> Network Admin -> Dashboard" it goes to http://mysite.com/wp-admin/network/ which gives me an error404. My home dashboard includeds the public directory: http://mysite.com/public/wp-admin/ but the network dashboard does not. BUT if I type in the word public in the link address (http://mysite.com/public/wp-admin/network/) all is well.
在我的 wp-config-php 中,我将其配置为:
In my wp-config-php I have it configured as this:
define('WP_DEBUG', false);
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'mysite.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy blogging. */
所以我尝试在路径行上手动输入public":
So I tried to manually type in "public" on the path line:
define('PATH_CURRENT_SITE', '/public/');
但后来我收到此浏览器错误消息:此网页有重定向循环http://mysite.com/public/wp-admin/network/
but then I get this browser error message: This webpage has a redirect loop The webpage at http://mysite.com/public/wp-admin/network/
所以我被困在这一点上.我将感谢任何人对此的帮助.这是我的 .htaccess 配置以防万一,我使用的是 wordpress 3.5.1
So I am stuck at this point. I will appreciate anyone's help with this. Here is my .htaccess configuration just in case and I am using wordpress 3.5.1
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) public/$1 [L]
RewriteRule ^(.*\.php)$ public/$1 [L]
RewriteRule . index.php [L]
# END WordPress
推荐答案
这个错误与 .htaccess
有关,当它发生在我身上时,我把它放在了错误的地方.您的 .htaccess
需要位于 Wordpress 目录的 root 中.您的 wp-config.php
文件在哪里.
This error is related to .htaccess
, when it happened to me I had it in the wrong place. Your .htaccess
needs to be in the root of your Wordpress dir. where your wp-config.php
file is.
这篇关于Wordpress 多站点 wp-config-php 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!