Install an SSL certificate on a WordPress environment (Linux)
Configure HTTPS encryption for a domain name attached to your Simple Application Server. HTTPS enables website identity verification and encrypted data transmission at low cost, preventing data tampering and information leakage during transit. This topic uses a Simple Application Server running WordPress 5.6.2 as an example to install an SSL certificate and enable HTTPS.
If your Simple Application Server was created using the WordPress 6.7.1 application image, you can enable HTTPS encryption with one click in the console. For more information, see Enable HTTPS with one click.
Background information
After you purchase and deploy a certificate from Certificate Management Service to your web server, your web service transmits data over HTTPS. HTTPS establishes an SSL-encrypted channel between the client browser and your web server, preventing data leakage or tampering during transmission. HTTPS encryption is required for mobile apps, mini programs, and other applications to be published in app stores or ecosystems. Key benefits include:
Security compliance: Meets app store and application ecosystem requirements.
Encrypts network data: Encrypts communication between users and your site, preventing data hijacking, tampering, and eavesdropping.
Improves website security: Helps prevent phishing. Browsers display security indicators when users visit your site, increasing trust, traffic, and search rankings.
Prerequisites
You have created a Simple Application Server. For more information, see Quickly build a website using a WordPress application image.
You have purchased a domain name. To purchase a domain name from Alibaba Cloud, see Register a generic domain name.
If your Simple Application Server is deployed in the Chinese mainland, ensure your domain name has completed ICP filing. For more information, see What is ICP filing?.
Your domain name is already attached to your Simple Application Server and domain name resolution is complete. For more information, see Register and resolve a domain name.
Step 1: Request an SSL certificate
You can use Alibaba Cloud to apply for free certificates, paid certificates, or certificates from other service providers. We recommend using free certificates for testing or personal trials. You cannot apply for free certificates for domain names with special top-level domains (TLDs), such as .org and .jp. For production environments, we recommend that you use paid commercial certificates. This topic describes how to apply for a free certificate. To purchase a commercial certificate, see Purchase a commercial certificate.
In late June 2024, Certificate Management Service renamed SSL free certificates to Individual Test Certificate (Free) and changed upgraded certificates (valid for 12 months) to Individual Test Certificate (Pro). For more information about the renaming of free certificates, see [Notice] Renaming of Free Certificates.
Each Alibaba Cloud individual or enterprise account (subject to real-name verification) can apply for a package of 20 free certificates once per calendar year. A calendar year runs from January 1 to December 31. The unused quota in your free certificate package is cleared at 24:00:00 on December 31 each year. You must wait until 00:00:00 on January 1 of the next year to claim the free certificate package for that year. For more information about the use cases, quota rules, and limitations of free certificates, see Description of Individual Test Certificates.
Purchase a free SSL certificate
Log on to the Certificate Management Service console.
In the navigation pane on the left, choose .
On the Individual Test Certificate (Formerly Free Certificate) tab, click Buy Now.
In the Buy Now panel, refer to the following table to purchase a Personal Test Certificate. Carefully read and select Certificate Management Service Terms of Service and Technical Support Agreement for Certificate Management Service. Click Buy Now and complete payment.
Configuration item
Description
Example for claiming a Personal Test Certificate (Free Edition)
Product
SSL Certificate: Entry point for purchasing commercial certificates. For parameter details, see Purchase a commercial certificate.
Individual Test Certificate: Typically used for testing or personal trials.
For differences between commercial and Personal Test Certificates, see Overview of Personal Test Certificates.
Individual Test Certificate
Certificate Type
Individual Test Certificate (Free): Formerly known as a free certificate. Valid for 3 months after issuance.
Individual Test Certificate (Pro): Requires a basic service fee (CNY 68 per certificate per year). Valid for 12 months after issuance.
Individual Test Certificate (Free)
Service
Displayed only for Individual Test Certificate (Free).
NotePersonal Test Certificates do not guarantee OCSP (Online Certificate Status Protocol) stability.
Use default
Quantity
Personal Test Certificate (Free Edition): Default is 20.
Each individual or enterprise Alibaba Cloud user (based on identity verification) can request 20 Personal Test Certificates (Free Edition) per calendar year (limited to one claim per calendar year). For more information about applicable scenarios, claiming rules, and usage limits, see Overview of Personal Test Certificates.
NoteA calendar year runs from January 1 to December 31. Unused quotas in your free certificate resource plan reset to zero at 24:00:00 on December 31 each year. You must wait until 00:00:00 on January 1 of the next year to claim your new annual quota for Personal Test Certificates (Free Edition).
If you exhaust your 20 Personal Test Certificates (Free Edition) within a calendar year, you can purchase Personal Test Certificates (Pro) or an HTTPS acceleration gateway. For more information, see Upgrade Personal Test Certificates, or purchase a commercial certificate directly. For more information, see Purchase a commercial certificate.
Personal Test Certificate (Pro): Minimum purchase is 1 certificate, maximum is 100.
Use default
Other Services
Application assistance and deployment services help resolve issues during SSL certificate use. These services coordinate with the certification authority (CA) to expedite certificate issuance and provide remote video guidance for installation and configuration. For more information, see Purchase certificate application assistance and deployment services.
Not Required
Assistance Application: Helps issue SSL certificates quickly during business hours (9:00–18:00) on weekdays.
Deployment: Helps deploy RSA or ECC algorithm certificates during business hours (9:00–18:00) on weekdays.
Assistance Application + Deployment: Provides end-to-end assistance for certificate application and deployment, including non-business hours (9:00–18:00), to quickly complete certificate issuance and deployment.
Not Required
Submit a free certificate request
Log in to the Certificate Management Service console.
In the navigation pane on the left, choose .
On the SSL Certificate Management page, click the Individual Test Certificate (Formerly Free Certificate) tab.
On the Individual Test Certificate (Formerly Free Certificate) tab, click Create Certificate.
In the Create Certificate panel, configure certificate parameters as shown in the following table, select Quick Issue, and click OK.
Configuration item
Description
Certificate Type
Select Individual Test Certificate (Free).
Remaining Certificate Quota/Total
Shows remaining certificates available / total certificates available. You can create a certificate only if the remaining count is greater than zero.
Domain Name
Enter the domain name this certificate will protect.
When applying for a Personal Test Certificate, enter only one single domain name, for example,
aliyundoc.com.ImportantDomains with special suffixes cannot apply for Personal Test Certificates. Examples include
.edu,.gov,.org,.jp,.pay,.bank,.live,.nuclear, and.ru. Commercial certificates have no such restrictions. To apply for a certificate for a domain with a special suffix, you must request a commercial certificate.Personal Test Certificates cannot be applied for public IP addresses. Only OV single-domain certificates from GlobalSign, DigiCert, GeoTrust, vTrus, CFCA support binding to IP addresses. For more information, see Purchase a commercial certificate.
To apply for certificates covering multiple domains in one operation, purchase a commercial certificate. For more information, see Purchase a commercial certificate.
Quantity
Number of certificates. Default is 1. Cannot be increased.
Quick Issue
NoteQuick Issuance means you enter certificate application details and submit for review in this step.
Domain Verification Method
If your current Alibaba Cloud account matches the account that manages DNS resolution for the domain, Certificate Management Service automatically detects this and defaults to Automatic DNS Verification. This option cannot be changed. After submission, the system automatically performs DNS validation.
If your current Alibaba Cloud account differs from the account that manages DNS resolution for the domain, choose one of the following methods to verify domain ownership:
Manual DNS Verification: Manually modify your domain's DNS records and add a verification record in your domain control panel.
Automatic Verification (Domain Name-level Authorization): Add a CNAME record at your DNS provider for domain ownership verification. After successful setup, future SSL certificate requests for this domain can use this method without re-adding DNS records. For more information, see Domain ownership validation.
File Verification: Download a dedicated validation file from the Certificate Management Service console and upload it to a specified directory on your server.
Contact
Select the contact for this certificate application. The contact information includes an email address and a mobile phone number. To create or modify a contact, click Create Contact or Edit, or go to Contact Management.
ImportantAfter the CA receives the certificate application, it sends a validation email to the contact's email address or communicates with the contact using their mobile phone number (only in the Chinese mainland) for the review. Make sure that the contact information is accurate and valid.
Location
Select the city or region where the applicant is located.
Encryption Algorithm
The key algorithm used by the certificate.
Defaults to RSA and cannot be changed. RSA is a widely used asymmetric encryption algorithm with excellent compatibility.
CSR Generation
A CSR (Certificate Signing Request) is submitted to the CA when requesting an SSL certificate. It contains your domain, organization information, and public key.
Automatic (recommended)
Alibaba Cloud automatically creates the CSR and private key. After issuance, download the complete file containing the private key.
Manually Enter
Use tools like OpenSSL or Keytool to generate your own CSR and private key files (store them securely), then paste the CSR content into the CSR File field. For instructions on creating CSR and private key files, see How to create a CSR file.
ImportantKeep your private key secure. If lost, you cannot use the certificate on your server, and recovery is impossible. You must generate a new key pair and reissue the certificate.
When requesting a Chinese cryptographic algorithm certificate with manual CSR entry, decryption requires the private key since it is not stored on Alibaba Cloud. Contact the private key generator for assistance (except for Wosign brand certificates).
The CSR encryption algorithm must match the selected "Key Algorithm." If unsure about your CSR's encryption algorithm, use the View CSR tool. For more information, see View CSR details.
Certificates issued this way do not support one-click deployment to other Alibaba Cloud products.
Select Existing CSR
Choose a CSR previously created or uploaded in the Certificate Management Service console that matches the Domains to Bind. For instructions on creating and uploading CSRs, see Create a CSR.
CSR File
This parameter is required only when CSR Generation is set to Manual or Select Existing CSR. Enter the content of your CSR file.
Follow the prompts under Verify Information to complete domain ownership validation.
After successful validation, the certificate is typically issued within 1–15 minutes. The certificate Status changes to Issued. If the SSL certificate remains unissued for an extended period, check your DNS validation configuration. For more information and common errors, see Domain ownership validation.
NoteIf you did not select Quick Issue, after creating the certificate request, you receive a certificate placeholder. In the Actions column for this certificate, click Apply for Certificate, enter application details, submit for review, then follow this step for validation.
Step 2: Configure the SSL certificate
After issuance, the certificate status changes to Issued. Deploy the SSL certificate to your server and configure it. For more information, see Deploy an SSL certificate.
Upload and deploy the SSL certificate.
In the navigation pane on the left, choose .
On the Deployment to Cloud Servers page, click Create Task.
On the Basic Configuration page, enter a custom task name and click Next.
On the Select Certificate page, choose the certificate type and associate the SSL certificate with your cloud server. Click Next.
On the Select Resource page, choose the appropriate cloud server and resources. Click Next.
The system automatically identifies and retrieves all eligible cloud server instances under your Alibaba Cloud account (those running web applications). If resources do not appear, verify that your cloud server runs a web application such as Nginx or Apache.
If a certificate was previously deployed to an instance, its name appears.
On the Deployment Configuration page, deploy the certificate to your cloud server as shown in the following table. Click OK.
ImportantIf the certificate configuration directory does not exist on your server, the system creates it automatically. The path configured in the console must match the certificate file path in your cloud server's web application configuration.
Configuration item
Description
Configuration example
Certificate Path
Set the absolute path for the certificate file on your cloud server.
/usr/local/nginx/conf/ssl/cert.pem
Private Key Path
Set the absolute path for the private key file on your cloud server.
/usr/local/nginx/conf/ssl/cert.key
Certificate Chain Path
Set the absolute path for the certificate chain file on your cloud server.
Not required.
Reload Command
After deploying the certificate, restart your web application or reload its configuration to activate it. Enter the restart or reload command here.
ImportantRunning these commands might cause service startup failures. If this occurs, operate directly on your cloud server.
Not required.
In the confirmation dialog box, click OK.
Configure the SSL certificate.
Remotely connect to your Simple Application Server. For more information, see Remotely connect to a Linux server.
Run the following command to update the certificate paths in the WordPress configuration file wordpress.conf (paths must match those set during deployment).
NoteThis example assumes Nginx is installed by default in your WordPress environment. Configuration file paths and names may vary—adjust according to your actual environment.
sed -i 's|^\s*ssl_certificate\s\+[^;]*;| ssl_certificate /usr/local/nginx/conf/ssl/cert.pem;|; s|^\s*ssl_certificate_key\s\+[^;]*;| ssl_certificate_key /usr/local/nginx/conf/ssl/cert.key;|' /usr/local/nginx/conf/vhost/wordpress.confExample parameters:
/usr/local/nginx/conf/ssl/cert.pem: Replace with the actual absolute path of the certificate file on your cloud server.
/usr/local/nginx/conf/ssl/cert.key: Replace with the actual absolute path of the private key file on your cloud server.
/usr/local/nginx/conf/vhost/wordpress.conf: Replace with the actual absolute path of your WordPress configuration file.
Run the following command to reload the Nginx service.
sudo systemctl reload nginxRun the following command to restart the database.
sudo service mysqld restart
Step 3: Verify the SSL certificate
Configure the HTTPS domain in the WordPress admin panel.
Log on to the WordPress admin panel.
For instructions on obtaining the admin panel URL, username, and password, see Quickly build a website using a WordPress application image.
In the navigation pane on the left, choose Settings > General.
In WordPress Address (URL) and Site Address (URL), enter your attached and resolved domain name. This example uses
https://example.com.Click Save Changes.
NoteAfter changing WordPress Address (URL) and Site Address (URL), the admin login URL becomes
https://example.com/wp-login.php. Replaceexample.comwith your actual domain.
Access
https://your Simple Application Server's domainin a browser.If a lock icon appears in the browser address bar, the SSL certificate is installed successfully.
If your site cannot be accessed via HTTPS, troubleshoot as follows:
Confirm that port 443 on your Simple Application Server is open and not blocked by other tools. For instructions on allowing port 443, see Manage firewall.
Verify ICP filing status. If your domain resolves to a server in the Chinese mainland, ensure ICP filing is complete. For more information, see What is ICP filing?.
Check certificate path configuration. Ensure the uploaded certificate path matches the configured path. For more information, see Configure SSL certificate.
References
Different server types support different SSL certificate formats. Choose the appropriate format based on your server type. For more information, see Deploy an SSL certificate.