Google Cloud Compute Engine

Install FREE SSL Certificate for WordPress on Google Cloud – Bitnami

Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we recommended.

Pinterest LinkedIn Tumblr

Install FREE SSL Certificate for WordPress on Google Cloud -Bitnami. This post, provides all steps to install Let’s Encrypt Certificate for your WordPress installation on Google Cloud with Bitnami.

Not using Bitnami? Choose a different Installation:


Click to Deploy


  1. WordPress Installation using Bitnami.
  2. Setup Google Cloud DNS for your Domain name.
Kamatera Cloud1 GB20 GB$4/mo
Alibaba Cloud1 GB20 GB$8/mo

Bitnami WordPress Installation

Bitnami is a packaged application provider for many platforms. The Package contents of Bitnami installation of WordPress on Google Cloud is listed below.

  • Apache webserver.
  • MySQL database.
  • PHP v7.2.
  • phpMyAdmin.
  • Varnish cache.
  • Latest WordPress.

Connect to your Instance by SSH

Once you have all the prerequisites ready, you can connect your instance and access it using SSH.

Go to your Google Cloud Console and navigate to Compute Engine >> VM Instances.

Click the SSH button that’s at the right of your VM Instance.

Now a new terminal will be opened and connected to your VM Instance.

Bitnami HTTPS Configuration Tool

Install and configure SSL in Bitnami installtion using Bitnami HTTPS Configuration Tool is the easiest method to configure SSL on Google Cloud.

Execute the below command and follow the prompts.

sudo /opt/bitnami/bncert-tool

This command will install Free Let’sEncrypt SSL certificate and automatically create a cron job to renew your certificates.

Alternative Approach

Install CertBot

Execute the following command to install Certbot Client which is used to generate SSL certificates.

chmod a+x certbot-auto

Generate SSL Certificates

To generate new SSL certificates execute the following command.

Replace with your Domain name.

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

Once you run the command, you need to enter your email address and accept the terms and conditions. Finally a set of certificated will be issued to you in this directory (/etc/letsencrypt/live/

Install FREE SSL Certificate

Edit your bitnami.conf file and make the folowing changes.

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

Paste the following code below the line DocumentRoot "/opt/bitnami/apache2/htdocs"

Replace with your Domain name.

ServerAlias yourdomainname .com
Redirect permanent /

Now scroll down below and find the default directives of SSLCertificateFile and SSLCertificateKeyFile

Comment the both line s by placing a # symbol at the starting of the line.

Paste the following certificates below the two lines.

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

So your output will be like this.


#SSLCertificateFile "/opt/bitnami/apache2/conf/server.cert"
#SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"
SSLCertificateFile "/etc/letsencrypt/live/"
SSLCertificateKeyFile "/etc/letsencrypt/live/"
SSLCertificateChainFile "/etc/letsencrypt/live/"

Hit Ctrl+x followed by Y and Enter to save the file.

Update Domain URls

Changing your website URLs via Settings > General is disabled in the Bitnami version, so need to change your URLs by editing your wp-config.php folder.

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

Replace the URLs with the below details.

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

define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/');

Restart Apache server

For the changes to take effect you need to restart your Apache web server.

sudo /opt/bitnami/ restart apache

Setup Auto-renewal

To setup auto-renewal for your certificate tou need to set up cronjob to check the certificate expiry and renew it automatically.

sudo mv certbot-auto /etc/letsencrypt/

Set up a cronjob.

sudo crontab -e

Choose 1 to select the nano editor.

Paste the following line to the last.

45 2 * * 6 cd /etc/letsencrypt/ && ./certbot-auto renew && /opt/bitnami/ restart

Hit Ctrl+X followed by Y and Enter to install the cronjob. This setting will check every week and renew the certificate which is close to expiry.


Now you have learned how to install FREE SSL Certificate for your WordPress with Bitnami on Google Cloud.

Thanks for your time. If you face any problem or any feedback, please leave a comment below.


  1. I want to know how to install vista cpanel in google cloud.
    In vista cpanel is free?
    Please help me….

  2. After one month now im face this issue please help me to solve this problem thanks in advance

    Your connection is not private
    Attackers might be trying to steal your information from (for example, passwords, messages, or credit cards). Learn more

Write A Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.