【问题标题】:wordpress blog in a subdirectory of the magento root foldermagento 根文件夹的子目录中的 wordpress 博客
【发布时间】:2017-01-31 22:53:38
【问题描述】:

我在 http://example.com 有一个 Magento 网站,我想在 http://example.com/blog 保留一个 Wordpress 博客。我已经安装了博客,一切似乎都很好,但是当我登录到 Wp-Admin 时,css 和 js 文件出现 404。

我的配置如下链接:-

https://serverfault.com/questions/594841/magento-wordpress-nginx-configuration

【问题讨论】:

  • 我知道这是很久以前的事了,但您能概述一下您为此采取的步骤吗?我也即将在 Magento 网站上安装 WP。谢谢。

标签: php wordpress magento nginx


【解决方案1】:

您是否正确设置了站点/主页 URL?

同样在 wp-config.php 中,确保将您的 WP_HOME 和 WP_SITEURL 变量设置为您正在使用的正确 URL(子目录)

应该是这样的:

$host = 'http://' . $_SERVER['HTTP_HOST'] . '/blog/';
define('WP_HOME',$host);
define('WP_SITEURL',$host);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-07
    • 2014-09-11
    • 1970-01-01
    • 2019-03-16
    • 2023-04-09
    相关资源
    最近更新 更多