Setup Free SSL for WordPress on Google Cloud (Bitnami) (Latest)
March 31, 2019Leron AminComments Open
In this quick-start tutorial you will learn how to configure free, auto-renewing SSL certificates for WordPress websites hosted on Google Cloud Platform compute engine using the Bitnami version of WordPress on Google Cloud Platform.
Go to your Google Compute homepage and click the hamburger menu in the upper left-hand corner.Navigate to Compute Engine, then to VM instances to access your WordPress installation.Once inside your Compute Engine, click on the SSH button to connect to your VM Instance.
2. Generate SSL Certificates
Now that you’ve connected to your VM instance, the next step is to copy and paste the certificate issuing command into your terminal. Remember to replace YOURMAIL, YOURDOMAIN, and www.YOURDOMAIN with the correct values.
For example, if your email address is [email protected] and your domains are 1pagezen.com and www.1pagezen.com, then your certificate issuing command would look like this:
3. Configure SSL Certificates
Now that you’ve entered the certificate issuing command, you will be prompted with a series of questions. For each of the three questions, press y and then press Enter.
4. Configure HTTPS Redirect
Now that that the certificates have been configured, the next step is to configure a redirect in your bitnami.conf file in order to redirect all traffic to the HTTPS (secure) version of your website. To do this, copy and paste the command below in order to open the bitnami.conf file for editing.
Now that you’ve opened the bitnami.conf file for editing, copy and paste the the three lines of code below, in the same location as shown in the picture (remember to replace 1pagezen.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.1pagezen.com/$1 [R,L]
5. Restart Apache Server
In order for the recent file changes to take effect, you must restart your Apache server. To do this, copy and paste the command below into your terminal.
sudo /opt/bitnami/ctlscript.sh restart apache
That’s it!
Now that you’ve configured free, auto-renewing SSL certificates for your website, you may also be interested in boosting your website’s performance by configuring Cloudflare CDN.
If you run into any issues with your certificates and want to verify that they’re configured properly, check out the SSL Checker tool. Also check out this tutorial on how to fix SSL errors.
If you have any questions or comments, please post them below!