【发布时间】:2020-11-08 07:14:09
【问题描述】:
我在 https 下运行的服务器 web 上安装了新版本的 wordpress。
我将两个 siteurl 和 home 选项值更改为我的 https://mysiteweb.com
我在 wp-config.php 中添加了以下值
define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/wp-content' );
define( 'WP_CONTENT_URL', 'https://mysiteweb.com/wp-content' );
define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/wp-content/mydir/plugins' );
define( 'WP_PLUGIN_URL', 'https://mysiteweb.com/wp-content/mydir/plugins' );
但是对于所有 css 和 javascript 文件加载,我仍然是同样的错误:
Mixed Content: The page at 'https://mysiteweb.com/' was loaded over HTTPS, but requested an insecure script 'http://mysiteweb.com/wp-includes/js/wp-emoji-release.min.js?ver=5.4.2'. This request has been blocked; the content must be served over HTTPS.
【问题讨论】:
标签: wordpress https mixed-content