如何在 WordPress 中添加 SSL 和 HTTPS [英] How to Add SSL and HTTPS in WordPress
问题描述
我正在尝试将 SSL 证书添加到我们在 wordpress CMS 中构建的网站.我们已经从我们的 GoDaddy 托管购买并安装了我们的 SSL 证书.
安装此软件后,我们需要在 wordpress CMS 中进行哪些更改.
能否请您解释一下有助于我们继续使用带锁和 https 的 SSL 证书的步骤.
谢谢,戈帕尔
你必须在wp_config.php
中做一些改变确保 FORCE_SSL_ADMIN
被定义为 true
define('FORCE_SSL_ADMIN', true);
<块引用>
可以提供帮助的要点
- 确保没有使用
http://
的来源 - 您可以使用 .htaccess 强制将用户重定向到
https://example.com
- 检查您的控制台是否有任何错误(关于混合内容),这可能是由于一个或多个文件加载时没有
https://
把它放到你的 .htaccess 文件中(如果它不存在)
RewriteEngine OnRewriteCond %{HTTPS} 关闭重写规则 ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I am trying to add SSL certificate to our website which is build in wordpress CMS. We already purchased and installed our SSl certificate from our GoDaddy hosting.
After installing this what will be the changes that we need to do in our wordpress CMS.
Could you please explain those steps that will be helpful for us to go ahead with SSL certificate with Padlock and https.
Thanks, Gopal
you have to do some changes in wp_config.php
make sure FORCE_SSL_ADMIN
is defined to true
define('FORCE_SSL_ADMIN', true);
Points that could help
- Make sure there is no source using
http://
- you can use .htaccess for force redirecting users to
https://example.com
- check your console for any errors (regarding mixed content) that's probably because of one or more files loaded without
https://
put this to your .htaccess file (if it's not there)
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
这篇关于如何在 WordPress 中添加 SSL 和 HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!