【问题标题】:Error when installing a further Wordpress within an already existing Wordpress在已经存在的 Wordpress 中安装另一个 Wordpress 时出错
【发布时间】:2018-11-22 00:50:51
【问题描述】:

我读到可能有两个 Wordpress 安装,一个在另一个中。具体来说,我的根位置有第一个 Wordpress 站点:

https://wpsite1.com

(当我购买他们的托管空间时,这个安装是由托管服务 Bluehost 自动完成的)。然后我创建了一个子目录并手动安装了另一个 Wordpress:

https://wpsite1.com/wpsite2

wpsite1.com.htaccess 文件如下所示:

# Use PHP5.6 as default
# AddHandler application/x-httpd-php56 .php

# BEGIN WordPress
AddHandler application/x-httpd-ea-php70 .php
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 6 hours"
    ExpiresByType image/jpeg "access plus 6 hours"
    ExpiresByType image/gif "access plus 6 hours"
    ExpiresByType image/png "access plus 6 hours"
    ExpiresByType text/css "access plus 6 hours"
    ExpiresByType application/pdf "access plus 1 week"
    ExpiresByType text/javascript "access plus 6 hours"
    ExpiresByType text/html "access plus 10 minutes"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access plus 3 hours"
</IfModule>
Header set X-Endurance-Cache-Level "2"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.
<IfModule mime_module>
  AddType application/x-httpd-ea-php70 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

全新二次安装/wpsite2.htaccess文件如下:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wpsite2/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wpsite2/index.php [L]
</IfModule>

# END WordPress

如您所见,子目录存在于RewriteBaseRewriteRule 中。但是,如果我访问这两个位置,我现在会收到以下错误:

"文件'wp-config.php'已经存在。如果您需要重置任何 该文件中的配置项,请先删除。你可以 立即尝试安装。”

并且状态码是500:

解决办法是什么?

【问题讨论】:

    标签: php wordpress configuration installation bluehost


    【解决方案1】:

    我认为您需要在单独的目录中安装另一个 wordpress 实例。

    您需要在根目录中创建一个名为“wpsite2”的文件夹,并且需要在其中安装第二个 wordpress 实例。您需要将数据库映射到它。

    然后您可以访问https://wpsite1.com/wpsite2

    最好致电或与 bluehost 的支持团队聊天。

    你可以参考这个。

    Create subdomain

    上面提到的东西是为了另一个 wordpress 安装。

    如果您想在同一个 wordpress 安装中安装两个 wordpress 实例,您可以参考 wordpress 中的“Multisite”。

    Multisite example

    【讨论】:

    • 这正是我所做的。
    猜你喜欢
    • 1970-01-01
    • 2015-10-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-14
    • 2019-12-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多