如何在 WordPress 中添加 SSL 和 HTTPS [英] How to Add SSL and HTTPS in WordPress

查看:29
本文介绍了如何在 WordPress 中添加 SSL 和 HTTPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 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屋!

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