September 22, 2019

Free SSL Certificate Setup for WordPress on Google Cloud (Click to Deploy)

Free SSL Certificate Setup for WordPress on Google Cloud (Click to Deploy)
An SSL Certificate enables the transmission of data across safe networks and prevents hackers from stealing personal information such as credit card numbers, names, and addresses. In this tutorial, we will learn how to install a free SSL certificate on WordPress websites hosted on Google Cloud.

Prerequisite: Before starting this tutorial, you should have WordPress installed on Google Cloud and Set up a custom domain for your WordPress website.

1. Connect to your Instance by SSH

Log in to Google Cloud Dashboard, go to Compute Engine -> VM Instances.

Free SSL Certificate Setup for WordPress on Google Cloud

Once inside your Compute Engine, click on the SSH button.

Free SSL Certificate Setup for WordPress on Google Cloud

2. Check Operating System

Check your OS by pasting the below command in the terminal and make note of the operating system as we need it in the next step. For example Debian 9.9 (stretch).

lsb_release -a

3. Install Certbot

Go to your web browser and log on to certbot.eff.org. Scroll down and select Apache from the software drop-down, then choose the right operating system.

Free SSL Certificate Setup for WordPress on Google Cloud (Click to Deploy)

After choosing your system requirements from the dropdowns, Scroll down the page and copy the command to install Certbot.

Free SSL Certificate Setup for WordPress on Google Cloud (Click to Deploy)

Go back to your SSH terminal and Paste your copied command, then press Enter to perform the command.

sudo apt-get install certbot python-certbot-apache -t stretch-backports

5. Generate SSL Certificates

Now that you have Certbot installed, generating the SSL certificates is the next step. Go back to certbot.eff.org and copy the second command.

Free SSL Certificate Setup for WordPress on Google Cloud (Click to Deploy)

Return to your SSH terminal and Paste the command to issue an SSL certificate, then press Enter.

sudo certbot --apache

You’ll be prompted with a series of questions and answer the questions according to the figures in the below picture.

Be sure to replace naffys512@gmail.com with your own email address and naffysmir.com with your own domain name,

Free SSL Certificate Setup for WordPress on Google Cloud (Click to Deploy) (2)

6. Restart Apache Server

For the changes to take effect you need to restart your Apache web server by executing below command.

sudo service apache2 restart

7. Update WordPress URLs

Log in to your WordPress account, go to Settings > General and replace the http:// with the https://. Then scroll to the page’s bottom and press the Save Changes button.

Free SSL Certificate Setup for WordPress on Google Cloud (Click to Deploy) 2

That’s It!

Congratulation! You have successfully installed an SSL certificate on your WordPress website. If you have any questions feel free to leave a comment below.

Naffys Mir

I'm Naffys Mir, Programming Geek and Founder of CodersStuff.com. Coders Stuff is a Blog Packed with Loads of High-quality Programming Tutorials and a Ton of Engaging Advice and Insight into Front and Back End Technologies.

View all posts

1 comment

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