Host A WordPress Website On Google Cloud

Google Cloud one of the most popular cloud services after AWS and Microsoft Azure. If you want to create a website and find the best hosting service, Google Cloud or GCP is for you. Also, Google provides a free subscription for one year.

We have already explained step-by-step how to sign up for Google Cloud just checkout. When you are completing the GCP sign up process, then you need to go through these steps for web hosting:-

  1. Create A Project
  2. Launch A Compute Engine
  3. Change IP Address to Static Mode
  4. Create Cloud DNS
  5. Change Name servers on Domain Registrar’s  Dashboard.

If you follow these simple steps, then you can easily host a WordPress website for a year for free.

© PROWEBTIPS | Subscribe Our Channel

Create a New Project

New Projects On Google Cloud

For installing a new compute engine, you need to create a fresh new project if you haven’t started it yet. If you have projects, then select one of them, then go for the next step.

Launch a Compute Engine or VM

New VM Intances on Google Cloud

For this process, we need to click on “Market Place” and search for “Bitnami WordPress.”

Market Place on Google Cloud

After getting a search result, you need to select “WordPress Certified by Bitnami and Automattic.”

WordPress on Google Cloud

Now click on the “LAUNCH” button. Then fill out some details, e.g., Deployment name, Machine type, Storage and Type, and Firewall.

VM Instances Details on Google Cloud
Firewall on Google Cloud

When you click on “Deploy,” then GCP will show you the process of deployments. There you can find your WordPress Admin Password and Username.

Deployment Data on Google Cloud

When you get this then your compute engine installation is done.

Change IP Address in Static Mode.

By default, GCP always sets the IP address in the “Ephemeral” type. It could cause an error when you shut down or restart your compute engine.

You have to change the IP address from ephemeral to static. Because if you restart the system or accidentally reboot the compute engine, your IP address (new IP) will be adjusted automatically cause of restarting the system. You also need to change the DNS IP address for the domain routing.

VPC Network on Google Cloud

Click “VPC network” and select “External IP address”

IP Address Ephmeral on Google Cloud

Now click on “Ephemeral” and select the “Static” type.

IP Address Static on Google Cloud

Now the next step.

4. Create Cloud DNS

Network Service on Google Cloud

Select “Network services” and then “Cloud DNS” to create a name server and point out the IP address.

Cloud DNS Zone on Google Cloud

Now click on “CREATE ZONE” for further process.

record sets on Google Cloud

When we click on “CREATE ZONE,” GCP automatically generates Name servers (NS) details. We need to add two more records set, “Recordset A” and “Recordset CNAME,” as you can see above in the image.

5. Change NS details on Registrar DNS Management.

DNS Management on Godaddy

Now add all NS details on your Domain DNS management. You need to copy nameservers and paste them on your domain DNS management.

In the next step.

6. Edit WordPress URL using SSH on GCP

wpconfig command

Open Google Cloud Console and connect your VM with SSH and run the following command :

sudo -i nano
Changing site url


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


url name indianaukri after change

After editing the URL with your domain name, hit CTRL+X and Enter on your keyboard to save changes.

Check, everything is working or not?

After a while, we open the site in a new tab for checking it’s working or not, and our all steps are great, all working. See the picture below.

Hello World

There also left some work you can see. We have to set up an SSL Certificate and Removing the Bitnami logo. So you can read our next blog for these works.

Also, Read

Please Support

If you like our content, please consider buying us a coffee.
Thank you for your support!

Leave a Comment