Cloud Tutorial

Free SSL Certificate Setup for WordPress on Google Cloud (Bitnami version)

How to install free ssl on google cloud platform

Install free ssl certificate for Bitnami WordPress on google cloud platform

This is step by step guide to install free SSL certificate for WordPress website that runs on Google cloud platform and most importantly this is for bitnami WordPress .(bitnami version), This is a letsencrypt renew guide as well on google cloud platform for WordPress bitnami version

SSl certificate will improve your search ranking.

So before moving in this tutorial you should complete 3 things first in order to install a SSL certificate.

First you should install WordPress on Google cloud platform (here)

Second you should point your domain with Google Cloud (here)

Third you need to reserve a static IP address on Google cloud platform (here)

I assume you have done these steps already.


🔥You can also read ultimate guide of create ecommerce website.


Now let's go ahead and install a SSL certificate on Google cloud platform.

Go to compute engine and then click on VM instances.




Connect WordPress with ssh by clicking on ssh button

Now you Should successfully connected with server. In this window Paste below command.


wget && chmod a+x certbot-auto

Press Enter


Now you need to generate a SSL certificate so our Second command is Certbot auto renewal client. It will take care of the auto renewal SSL certificate so you don't have to renew your certificate by yourself.

Use the below command (Make sure you add your own domain )

./certbot-auto certonly --webroot -w /opt/bitnami/apps/wordpress/htdocs/ -d -d

Press Enter


Press Y to Continue


Type your email address


Press A for agree


Press N if you do not want to share your email or you can Press Y if want to share your email

Now you should see Congratulation message, (like you're seeing in above image) that means you have successfully generated a SSL certificate.

(or letsencrypt renew has done, if your ssl expired.)

(You have successfully Install free SSL certificate for bitnami WordPress)

It's time to test our auto renewal SSL certificate functionality.


Next Paste below command

./certbot-auto renew --dry-run

Press Enter


If you see Congratulation That means your auto renewal function is working.

Now in the next step you have to set up a crontab. in general crontab will check the ssl certificate, is ssl certificate due for renewal if yes then it will automatically renew it.

Now paste the below command


sudo crontab -e

Press Enter


Here you have to choose text editor 1-3 to create the crontab

Press 1  (This is nano, easiest text editor.) and then Press Enter


Using the down arrow from your keyboard and place your cursor below the last line in this window and paste the following Command

0 0 * * * ./certbot-auto renew --quiet --no-self-upgrade
0 12 * * * ./certbot-auto renew --quiet --no-self-upgrade

This command will tell certbot to check for the letsencrypt renew auto renewal SSL certificate two time a today, other words it will Install free SSL certificate by itself.

After pasting this command Press Ctrl+x and then Press Y  for yes, lastly Press Enter


In the next step we have to configure the SSL certificate. Now use the below Command.

sudo nano /opt/bitnami/apache2/conf/bitnami/bitnami.conf

With this command it will open up our bitnami configuration.


Go to middle using you down arrow key. (see above image)

Execute the below command

Redirect permanent /

This command going to tell our server to server only (https) secure connection on this website.

Do not forget to replace with your own domain name

Note: you can use WWW on your website or you can remove it. it is person preference.

Do not Press Enter yet

In this same page scroll down using your down arrow key, go where you see two line of ssl certificate text (see the image)


In front of these two lines Type

below these two lines you should Paste the path of ssl certificate.

Paste the following command.

SSLCertificateFile "/etc/letsencrypt/live/"
SSLCertificateKeyFile "/etc/letsencrypt/live/"
SSLCertificateChainFile "/etc/letsencrypt/live/"

Remember to replace your domain with

After pasting this command Press Ctrl+x and then Press Y  for yes, lastly Press Enter


In the next step you should change your WordPress website URL from WP-config file.

Execute the command below to open your WP-config file

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

Press Enter


Go to middle of the Page by pressing down arrow key and locate these two lines of code (see the above image)

Replace these two lines with below command (delete them and add new lines from below)


Understand this one more time

Replace this code

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

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

With this code



Keep in mind that you must replace your domain name with moreover you can use WWW to run your website or you can go with

After pasting this command Press Ctrl+x and then Press Y  for yes, lastly Press Enter


lastly Restart your Apache Server

Execute the command below to restart Apache server

sudo /opt/bitnami/ restart apache


Congratulation ! You have successfully installed SSL certificate on your website now you can check out your website.

if you have any question regarding this tutorial feel free to ask anything regarding this topic.

Do not forget to subscribe to our Newsletter.

Check out our WordPress tutorials here

Leave a Reply

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

Exit mobile version