WordPress website HTTPS configuration tutorial How to enable HTTPS in WordPress

888u

Last update at :2024-06-02,Edit by888u

With the continuous popularity of HTTPS, more and more websites have turned on HTTPS and added a small green lock logo to the website. As a world-renowned website building system, WordPress has very good compatibility with HTTPS and almost does not use it. Any modification only requires that the server is configured with a certificate and can be accessed using https links. However, users often report that there is no green lock in the address bar after turning it on (Chrome browser). Here is a brief introduction to the configuration tutorial. The following configuration tutorial is based on the premise that the SSL certificate has been configured on the server. If there is no SSL certificate, you may need to purchase an SSL certificate first and configure it on the server to ensure that the website can be opened using the https protocol without prompting security risks.

Change address

If https is enabled on the website, it is best to change the website address to https. Change method: Settings>General, modify WordPress address and site address , change it to the address of https protocol.

Modify setting information

The setting information includes image static files in theme settings, plug-ins and other settings, such as LOGO, slideshow images, etc. Since the previous settings were all image addresses of the http protocol, they need to be modified to https addresses.

Article pictures

The pictures in the article also need to be modified to the https protocol. If there are few articles, you can manually edit and modify the pictures of the article. If there are many articles, you can refer to the method of modifying the domain name and replace the database in batches: enter database management (such as phpmyadmin< /strong>), enter the database where wordpress is located, then enter the SQL command and enter:

UPDATE wp_posts SET post_content = replace( post_content, 'http domain name', 'https domain name');

CDN domain name

If the CDN second-level domain name is enabled for static files, you need to enable https for the CDN domain name separately, because for security reasons, browsers cannot load certain static resources of http in https, such as js files and fonts. Documents etc.

Other settings

After configuring the above information, the website can already be accessed using https. As expected, a small green lock should also appear when accessing the chrome browser. In the future, you can also make the following optimization configurations:

  • It is recommended to do a 301 redirect to jump the http address to https address;
  • Enabling https website may slow down the opening speed. It is recommended to enable cache, such as wp super cache;
  • If possible, it is recommended to configure strict-transport-security, refer to: https://developer.mozilla.org/zh-CN/docs/Security/HTTP_Strict_Transport_Security

Recommended site search: domain name registration query server high-defense Hong Kong cancellation registration, space rental, windows virtual host, free application for domain name and space domain name registration service, website registration number, cloud server rental, website virtual host space,

WordPress website HTTPS configuration tutorial How to enable HTTPS in WordPress

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码