WordPress click to deploy on google cloud platform

Introduction

This article provides complete guide for hosting WordPress websites on Google cloud platform (WordPress click to deploy stack). Though many WordPress stacks are available on Google cloud platform, most commonly used ones are – (i) WordPress Certified by Bitnami and (ii) WordPress click to deploy. Although WordPress certified by Bitnami is better stack, this is complete guide for WordPress click to deploy hosting on google cloud platform.

We will go through following steps for hosting reliable, safe and fully functional wordpress websites (through this process, we will deploy WordPress click to deploystack on Google Cloud compute engine).

Want to learn complete Web Development with certification? Enroll Now for Web Development Certification Training By Edureka and increase your chances to get hired by Top Tech Companies.

Before starting with this guide, you must have your Domain Name (e.g., example.com or example.in) registered. You may Register your Domain Name for most cost effective price at BigRock  or Hostinger.

  1. Create Gmail Account

First of all, we need to create our google account (Gmail Account) because we need Gmail to sign up for Google Cloud Platform (GCP). We need Gmail for signing up with all the Google services. If you already have Gmail account, you may proceed to the next step. Create Gmail Account.

  1. Create Free Trial GCP Account

After creating your Gmail Account, head over to Google Cloud Platform (GCP). Sign up for your Free Trial GCP Account. On GCP website, Click Get Started for Free button and follow the Account creation steps on the screen. Enter all required Personal Information details and Billing Information to create your GCP Account. You need to provide your credit card information for setting up billing account and verifying payment transaction. Rest assured, Google does not charge your credit card ever without you entering in an agreement to do so for some service. After GCP Account is set up, you can use all the technology resources available on the platform.

  1. Deploy ‘WordPress click to deploy’ Instance

Sign in to your GCP Account with your Gmail. Then go to Console. Click on Project menu on top and create new project by giving Project Name you like. By default, a project by name My First Project is created.

Then, click on the Hamburger icon (≡) on top left and click the menu Marketplace. Type WordPress on Search bar. Many WordPress solutions will be listed. Go to WordPress click to deploy. We can build functional websites with this WordPress packages installation easily and managing them is less complecated.

Click Launch button which will take you to New WordPress click to deploy Deployment screen. Fill up your Zone and Disk size details or you may go with the defaults. Then click Deploy button. Deployment will take a couple of minutes and you will see details of your WordPress Multisite instance deployment on the right side. You may check your deployment here or as described in next the step.

  1. Check your WordPress Multisite Deployment

Click on Hamburger icon (≡) on top left and select Deployment Manager. Select your WordPress Multisite Deployment. If you click on the Site Address URL, you will be redirected to the Sample page of your WordPress website. If you click on the Admin URL, you will be redirected to the WordPress Admin Login page. Here, fill up your Admin User ID and Admin Password as provided in your Deployment details. Thereafter you will reach on Admin Dashboard of your WordPress website. Here you will be building and making changes (edits) to your website as Administrator, after all the following set up steps are complete.

  1. Reserve static external IP Address

Now, click on Hamburger icon (≡) on top left corner and select VPC Network >> External IP Addresses. Click on Reserve IP Address. Fill up all details and click Reserve. Here, change External IP Address Type from Ephemeral to Static. We do this because, when a stopped instance is started again, a new ephemeral external IP address is assigned to the instance, and we don’t want the IP Address to change each time our instance is restarted.

  1. Create and Configure DNS Zone for your WordPress Hosting

Click again on Hamburger icon (≡) on top left corner of GCP screen and select Networking >> Network Services >>Cloud DNS. Here, click on Create Zone button. Fill up Zone name (usually your website domain name, in lower case, eg. example) and DNS Name (your domain name address, eg. example.com). Select Zone Type Public and DNS Sec OFF. Click Create. DNS Zone will be created.

Now create “A” Record and “C” Record:

To create “A” record, click on Add Record Set. 

To create “A” record, click on Add Record Set and fill the details- 

(i) DNS Name field – leave blank.

(ii) Record Type field – ‘A’.

(iii) In IPv4 field, type or paste External IP Address. Click Save.

To create “C” record, click on Add Record Set.  In DNS Name field, type subdomain “www”. In Canonical Name field, type alias this www Sub-Domain refers to (website Address, e.g., example.com).

  1. Do Modification in DNS Zone of your Domain Name Provider/ Registrar   

Log in to Domain Name Registrar’s website and go to DNS Records or DNS Zone. Here, either change Name servers to point to your hosting or add the ‘A’ record of your hosting.

(i) Change Name Servers – Add all four Name Server Records of your hosting (as provided in DNS Zone of your deployment at GCP, e.g., ns-cloud-d1.googledomains.com, ns-cloud-d2.googledomains.com, ns-cloud-d3.googledomains.com, ns-cloud-d4.googledomains.com) replacing the existing Name Server records. Save Records.

(ii) Add the “A record” –  Click Add Records. Leave blank or type ‘@’ in ‘Host’ field (as specified by Domain Registrar). Type or paste external IP Address of your hosting (deployment on GCP) in ‘‘DNS Name/ Points To/IP Address’’ field, as the case may be.

  1. Edit WordPress Address and Site Address in WordPress Admin Dashboard (Change from IP Address to Domain Name Address)

Login to your WordPress Admin dashboard with User Name and Password credentials as provided in your Deployment details at GCP. Go to Settings. Copy the External IP Address of your WordPress Deployment at GCP and paste in WordPress Address(URL) and Site Address (URL) fields after http://

Save the Settings. Now, you can visit your website on this URL Address.

  1. Install SSL Certificate for your WordPress website.
  • Now, Click on Hamburger icon (≡) on top left corner of GCP console and select Deployment Manager. Log in to SSH terminal of your Deployment by clicking on SSH button. Type following command in SSH terminal to check the Operating System details (Distribution and Description, eg. Debian 9.7).

     lsb_release –a

  • Now visit https://certbot.eff.org and select Install Certbot for your Software configuration. Copy the command that is provided there. Paste that command in your SSH terminal for certbot installation. Press Now type next command for generating and installation of SSL certificate. Follow on-screen instructions for issue and installation of SSL certificate.
  • Log in to your WordPress Admin dashboard and edit the WordPress Address and Site Address from http to https version. Login again with https address.
  1. Install and activate Really Simple SSL WordPress Plugin to force ssl certificates on the website (How to install Really Simple SSL)

You may need to fix mixed content issue if you are using Elementor plugin on your website (How to fix mixed content issue in Elementor after moving to SSL).

  1. Setup Mail SMTP 

Setup Mail SMTP for the WordPress websites to be able to send Emails either with:

Gmail API or Other Email service.

  1. Final Words

Your WordPress website is setup. Now Login as Administrator in WordPress eg. https://example.com/wp-admin/ . Go to Website Dashboard >> Settings and do required basic setup and save changes. Then, Install required Theme and Plugins and start building functional websites. All the Best. For any queries, please write to redfalconvp@gmail.com.

One final step, you may improve the security and performance of your Website (s) by signing up (Free Signup available) at Cloudflare and adding your website at cloudflare.com.

You may be interested in How to host and set up WordPress Multisite certified by Bitnami on Google cloud platform.

That’s it! Keep editing and design stunning websites. All the best!

Leave a Reply