In this blog, we will cover how to install let’s encrypt SSL certificate for AWS Lightsail WordPress bitnami instance. 

Pre-requisites

SSH access to WordPress site. Default WordPress location is: 

/opt/bitnami/wordpress

Please ensure that the WordPress and Site URLs are set to your domain name e.g. http://yourdomain.com

Create Let’s Encrypt Certificates

You can install some wordpress plugin like “WP Encryption” and use the free version to generate and download Let’s Encrypt certificates for your domain. You can download the CRT and PEM file and rename them as server.crt and server.pem

Upload SSL certificates to WordPress Bitnami Site

Upload the certificate and pem key file to server under this location: /opt/bitnami/apache/conf/bitnami/certs

You can delete or rename existing default certificate and pem file if needed. Change the ownership of certificate and PEM file to bitnami user by using the following command:

chown bitnami:bitnami server.*

Update WordPress Config file 

Update wp-config.php file and change http to https i.e.

define( 'WP_HOME', 'https://yourdomain.com/' );
define( 'WP_SITEURL', 'https://yourdomain.com/' );

Restart Apache Service

sudo /opt/bitnami/ctlscript.sh restart apache

Output should look similar to this:

aws lightsail bitnami wordpress ssl with lets encrypt

Leave a Reply

Your email address will not be published. Required fields are marked *