网站为什么要开启HTTPS?
需要先了解HTTPS是什么?HTTPS(全称:Hyper Text Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP的安全版。即HTTP下加入SSL层,HTTPS的安全基础是SSL,因此加密的详细内容就需要SSL。 它是一个URI scheme(抽象标识符体系),句法类同http:体系。用于安全的HTTP数据传输。https:URL表明它使用了HTTP,但HTTPS存在不同于HTTP的默认端口及一个加密/身份验证层(在HTTP与TCP之间)。HTTPS协议是由SSL+HTTP协议构建的可进行加密传输、身份认证的网络协议,要比http协议安全
WordPress全站开启https具体过程
购买或者使用免费的SSL证书,在nginx配置
把原网站http引用的图片和静态资源改成https
wordpress后台改成https访问
我觉得这样的步骤太麻烦了,其实只需在nginx进行配置即可,以下是步骤
1. 到startssl购买或者免费获取crt文件,简单步骤
* 验证域名

* 添加域名

* 生成CSR文件并拷贝

* 提交并下载生成后的CSR

2. 配置nginx,端口为443

配置80端口自动跳转到443

重启nginx需要密码,也是就openssl生成csr的时候输入的密码

3. 至此,访问不带https也会跳转到加密的https,是不是很简单,不需要去修改WordPress的PHP代码。
wxgzh:ludong86,欢迎交流。

一切为了积分