多站点 wordpress 中新站点的 500 错误 [英] 500 error for new site in multisite wordpress

查看:43
本文介绍了多站点 wordpress 中新站点的 500 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Wordpress 安装在子文件夹中.public_html/wordpress/所以,我想要两个站点:mydomain.com/wordpress 和 mydomain.com/wordpress/fr

Wordpress is installed in subfolder. public_html/wordpress/ So, I want to have two sites: mydomain.com/wordpress and mydomain.com/wordpress/fr

mydomain.com/wordpress 运行没有任何问题.

mydomain.com/wordpress works without any problems.

当我尝试访问 mydomain.com/wordpress/fr 时,我被重定向到主站点 (mydomain.com/wordpress) 的找不到页面.当我访问 mydomain.com/wordpress/fr/wp-admin 时,我收到 500 内部服务器错误.

When I try to go mydomain.com/wordpress/fr, I'm redirected to Page Not Found of the main site (mydomain.com/wordpress). When I go mydomain.com/wordpress/fr/wp-admin I get 500 Internal Server Error.

这里是我的 .htaccess 文件:

Here my .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)??les/(.+) wp-includes/ms-?les.php??le=$2 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wordpress/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wordpress/$2 [L]
RewriteRule . /wordpress/index.php [L]
</IfModule>

这里是我添加到 wp-config.php 的部分:

Here the part I added to wp-config.php:

define('WP_ALLOW_MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'mydomain.com/wordpress');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('WP_ALLOW_REPAIR', true);

这是我的新站点的网络面板中的一些设置:域:http://mydomain.com路径:/wordpress/fr/网站网址:http://archex.ca/wordpress/fr

Here some settings in Network Panel for my new site: Domain: http://mydomain.com Path: /wordpress/fr/ SiteURL: http://archex.ca/wordpress/fr

请帮帮我.

推荐答案

我仍然遇到这个 500 错误(仪表板)400 错误(访问站点)通过 Wordpress Multisite 为我的附加域"/非根站点 (/public_html/mysite.com) 创建一个新站点(子域).我看了几个小时的论坛,没有找到我的答案.但是我更改了一些东西,现在它可以完美运行,所以希望这可以帮助那里的人.除了拥有 正确的 wp-config &.htaccess(参见之前的评论或其他论坛),我不得不:

I was still having this 500 error (dashboard) or 400 error (visit site) immediately after creating a New Site (subdomain) through Wordpress Multisite for my 'AddOn Domain'/non-root site (/public_html/mysite.com). I looked at a ton of forums for hours and didn't find my answer. But I changed a few things and it works perfectly now, so hopefully this can help someone out there. In addition to having a correct wp-config & .htaccess (see previous comment or other forums), I had to:

(1) 将通配符 (*) 添加到我的域 DNS 设置

  • 类型:A
  • 姓名:*
  • 值:[在此处插入您的 IP 地址]
  • TLL:(我使用了 10800,因为我的其他 A 类型正在使用该数字)

(2) 创建通配符 (*) 子域 &编辑 (cPanel)

  • 错误(使用 GoDaddy 的 cPanel 自动创建)

  • WRONG (auto-created using cPanel from GoDaddy)

  • 子域:*.mysite.com
  • 文档根目录:/public_html/通配符.mysite.com
  • Subdomains: *.mysite.com
  • Document Root: /public_html/wildcard.mysite.com

右(以上后自行编辑)

  • 子域:*.mysite.com
  • 文档根目录:/public_html/mysite.com(取出通配符.)

我听说 DNS 更改可能需要一些时间才能传播,因此如果您必须将其添加到域中,请给它一些时间.祝你好运!

I've heard that the DNS changes can take some time to propagate, so give it some time if you had to add that to your domain. Good luck!

这篇关于多站点 wordpress 中新站点的 500 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆