How to Install Free SSL Certificate for Bitnami WordPress on Google Cloud

0 228

An SSL Certificate is a block of code on a web server that facilitates encryption between a web server and a web host. It prevents your communication from being intercepted or manipulated by eavesdropping third parties.

Nowadays, SSL is essential for any kind website, even if it doesn’t handle sensitive information like your debit or credit cards details. It also helps to improve your SERP position on the search engine. So, having an HTTPS version of your site can be beneficial for your website SEO.

Suggested ReadingHow to Install WordPress on Google Cloud Platform (Bitnami Version)

In this tutorial, you will learn how to install and configure a free, auto-renewing SSL certificate for your Bitnami WordPress site that hosted on GCP Compute Engine.

Ok, Now Let’s Get started

Install Free SSL Certificate For Bitnami WordPress Site On Google Cloud Platform

Steps to Install and Configure an SSL Certificate for your Bitnami WordPress Site on GCP

I assumed that you already had done WordPress Installation on GCP ( Bitnami Version ) and also completed Domain Set up and configuration for your site. Ok, now follow my steps below to Install and Setup Let’s Encrypt free SSL Certificate for your WordPress Site.

Connect to WordPress via SSH

Step 1: Log in to your Google Cloud Console dashboard and then go to VM Instances.

Steps to Navigate VM instances Page on Google Cloud Console
Steps to Navigate VM instances Page on Google Cloud Console

Step 2: At the VM Instances page, you will see the SSH option. Now simply click on the SSH button to connect with your WordPress installation.

Connect to SSH from VM Instances on Google cloud
Connect to SSH from VM Instances on GCP

Generate SSL Certificate for your site

Step 3: Now after connected to VM Instances via SSH, you need to enter the following comment and then press enter to generate your website SSL Certificate.

sudo /opt/bitnami/letsencrypt/scripts/generate-certificate.sh -m example@gmail.com -d bloggerlessons.com -d www.bloggerlessons.com
SSL Certificate Command for Bitnami WordPress Site

Please note – You need to replace “example@gmail.com” with your email address and instead of “bloggerlessons.com” use your domain. Before entering the comment, don’t forget to modify these parts.

Configure SSL Certificate

Step 4: Now, after entering the certificate issuing command, you will be prompted with three different questions, and for each of those questions, press “Y” and then press the Enter button.

Permission for SSL Certificate Configuration

Configure HTTPS Redirect

Step 5: After the SSL certificate configuration, the next step is to configure a redirect in our bitnami.conf file to redirect all traffic to the HTTPS (Secured) version of your site. To do this, copy and paste the command below to open the bitnami.conf file for editing.

sudo nano /opt/bitnami/apache2/conf/bitnami/bitnami.conf
Configure HTTPS Redirect

Step 6: Ok, now you’ve opened the bitnami.conf file for editing. Now just copy and paste the three lines of code below, in the same location as shown in the following screenshot (remember to replace bloggerlessons.com with your own domain name). After editing the file, press CTRL+X then Y to save and exit the file.

RewriteEngine On 
RewriteCond %{HTTPS} !=on 
RewriteRule ^/(.*) https://www.bloggerlessons.com/$1 [R,L]
Configure HTTPS Redirect

Restart Apache Server

Step 7: After making changes to the file, you will need to restart your server for changes to take effect. To do this, copy and paste the following command into your terminal and then press Enter.

sudo /opt/bitnami/ctlscript.sh restart apache

That’s It

Now you just finished the configuration of Let’s encrypt free auto-renewing SSL certificate for your website. If you run into any issues with your SSL Certificates and want to verify that they’re appropriately configured or not then, this SSL Checker tool can help you.

You might also likeHow to Setup Free SSL for WordPress on Google Cloud (Click-to-Deploy Version)

I hope this tutorial helps you to solve your problem. If you face any trouble, then please let me know by commenting below.

Subscribe to our newsletter
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.