Setup Free SSL with Auto-Renew for Bitnami WordPress on Google Cloud

by Fred Osei

This tutorial will walk you through the process of generating and setting up auto-renew for Let’s Encrypt SSL certificate for your domain and configuring it to work with your WordPress Certified by Bitnami and Automatic Instance on Google Cloud.

Let’s Encrypt is a free Certificate Authority (CA) that issues SSL certificates.

Before we kick off with this tutorial;

Let’s get on with it…

1. Login to your Google Cloud Platform account and click on the Navigation Menu icon from your Google Cloud Dashboard as shown below.

2. From the sidebar menu, click or hover on the Compute Engine link and click on the VM instances link from the popped menu as shown in the screenshot below.

3. From your VM instances screen, click on the SSH link next to the instance you just deployed as shown in the screenshot below to connect the Instance you just deployed.

4. To launch the SSL Configuration tool, copy and paste the bncert command below into your SSH terminal as in the screenshot below and hit the Enter key on your keyboard to continue.

sudo /opt/bitnami/bncert-tool

5. When presented with an update prompt as in the screenshot below,  respond with Y for yes, hit the Enter key on your keyboard to continue then copy and paste the command below to re-run the bncert tool.

sudo /opt/bitnami/bncert-tool

6. Enter the non-www and the www versions of your root domain, be sure to separate both versions with space as in the screenshot below and then hit the enter key to continue.

7. Follow the screenshot below to answer the prompts in the next stage to continue (please be very cautious at this stage).

8. At stage 8 you’ll be prompted with a screen of the changes to be made to your instance as in the screenshot below, respond with Y and hit the Enter key to continue.

9. Enter your Email address, hit the enter key to continue (the email address is used for certificate expiration notifications), and then Respond with Y for yes and again hit the Enter key on your keyboard to agree to the Let’s Encrypt subscriber agreement as in the screenshot below.

9.  Congratulations the Bitami HTTPS tool succeeded in modifying your installation, press [Enter] on your keyboard to continue.

Updating WordPress URL

10. Copy & Paste the command below into your SSH terminal as shown in the screenshot below to open your wp-config.php file.

sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php

11. Use the down arrow key on your keyboard to find your WP_SITEURL and WP’_HOME URL (define(‘WP_SITEURL’,’‘); define(‘WP_HOME’,’‘);). 

12. Replace the HTTP versions of your domain name in the WP_SITEURL and WP’_HOME URL with the HTTPS versions simply by adding “s” at the end of “HTTP” (define(‘WP_SITEURL’,’‘); define(‘WP_HOME’,’‘);).  as in the screenshot below.

NB: Please remember to replace “” with your actual domain name, and please change the leading http:// to https://.

13. Save the changes you just made by pressing down ctrl + x on your keyboard, hit the Y key to confirm saving and then hit the Enter key save the updated changes.

14. Restart apache to see your changes by executing the below command.

sudo /opt/bitnami/ restart apache

15. Your website should show a padlock when opened in an internet browser as in the screenshot below, this tells SSL is active and that your visitors are protected when they enter sensitive information on your website. 


That’s it.

I hope you found this post useful and that you have been able to Setup Free Let’s Encrypt SSL with Auto-renew for WordPress Certified by Bitnami on Google Cloud.

Drop any questions you may have in the comments section below and I will respond as soon as I can. Remember to like share and subscribe to our Social Media channels (links sidebar and footer). @KwikHacks


Dray January 25, 2021 - 12:14 pm

Thanks for this post!
Do you have a tutorial on how to set up an email address for the domain name?


Fred Osei February 19, 2021 - 9:13 pm

Hi I will be posting a video of that on my youtube channel in a few days, please subscribe tothe channel so you get notified when I post, and sorry for the late response, I was away for sometime

CHANDRAKANT SANGALE December 18, 2020 - 4:34 pm

after access to ssh, the same process is working on AWS Bitnami WordPress instance running on ec2

Fred Osei January 4, 2021 - 1:52 am

yes, the same process works, complete tutorials for AWS will soon be live.

Ross July 1, 2020 - 6:57 am

Hi will this auto renew the certificate?

Fred Osei July 1, 2020 - 12:36 pm

Hi Ross, yes this will auto-renew your SSL certificate, the bncert tool configure a cron job to do that

saad May 22, 2020 - 11:26 pm

The website is secure on other browsers but still insecure on google browser. Please update on this

Fred Osei May 23, 2020 - 6:12 pm

Be sure you followed the steps in the tutorial carefully and also crosscheck with the below;

Follow the steps below

1. Flush your system DNS by opening cmd and running the below command


2. Open your wpconfig.php file by running the command below

sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php

3. Look for the line in step 3.1 below from your wp-config.php file and replace it with the line in step 3.2 below, be sure to change http in your domain to https.

3.1. define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);

       define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);

3.2. define(‘WP_SITEURL’,’’);


4. Save the updated changes using [CTRL + X], respond with [Y] for yes and hit [Enter] to save.

5. Restart Apache server using the below command

sudo /opt/bitnami/ restart apache


Kasunka May 3, 2020 - 10:13 am

Hey Fred! Thanks for your good tutorial,
I have two problems In ssh my save CTR+O and exit CTR+X donot work. Is there anything to do? Thank You.!

Fred Osei May 3, 2020 - 1:31 pm

Hi Kasunda, I did not mention [Ctrl + O], all you need is [Ctrl + X] to save any change, then respond with Y for yes to confirm saving whatever changes there may be and then hit [Enter] to complete. If [Ctrl + X] is not working on your keyboard you might consider using an external keyboard or a virtual keyboard which comes with most operating systems. Please let me know if this helps

Alan Snider May 2, 2020 - 5:24 pm

Great tutorial. You obviously spent a great deal of time on this. Very helpful, thank you

Fred Osei May 2, 2020 - 11:19 pm

Thanks Alex


Leave a Reply to saad Undo Reply