Install WordPress on Google Cloud Platform

  1. Go to Google Dashboard and go to the Marketplace
  2. Search for WordPress Bitnami and Launch it
  3. Configure your VM instance then Deploy
  4. Once your WordPress is installed, login to it and update your User password
  5. Assign a static IP address
  6. Point the static IP address to your domain name
  7. Set up the bncert-tool for SSL
Detailed instructions

1. Go to Google Dashboard and go to the Marketplace

Go to your Google dashboard: https://console.cloud.google.com/home/dashboard

On the top left, you’ll see the hamburger icon (3 horizontal lines) and look for Marketplace.

Google Cloud Marketplace

2. Search for WordPress Bitnami and Launch it

You’ll be presented with all the applications you can install. On the search bar, enter WordPress Bitnami. We’ll select Bitnami version because it usually includes the SSL packages called bncertool so you don’t have to install it separately. Look for WordPress Certified by Bitnami and Automattic

Wordpress Bitnami

Select it. You can read the details on what software packages will be installed as well as pricing. Once you are done, click Launch. If there are certain plugins that you don’t need, you can uninstall it when you login to WordPress.

Wordpress Bitnami and Automattic

If this is your first time installing something from the marketplace, you’ll need to enable the required APIs. Click the Enable button and it’ll install those APIs which could take about a few minutes.

enable required apis

3. Configure your VM instance

You are now ready to configure your server vm instance, you’ll see the following:

Deployment Name, Name it based on your project so it’s easy to identify it especially if you have numerous projects.

Zone, pick the zone that’s closest to your audience so the website loads faster. And if you want to take advantage of Google’s free tier program, then pick any US-East1, US-West1 and US-Central1 with e2-micro VM. To read the latest Free tier limitations, go to https://cloud.google.com/free/docs/gcp-free-tier and WordPress is under Compute Engine

compute engine

For Machine family series pick E2 and e2-micro for machine type if you want to take advantage of the free tier. If you want something faster, pick the faster processor and more memory. However, keep in mind that your cost will increase.

E2 medium CPU

For Boot disk type, select Standard persistent disk and pick 10GB under Boot disk size for free tier. This is usually a good start and you can increase this later on even if your WordPress site has already been deployed.

Boot disk

Keep Allow http and Allow https are checked by default but double check that it is. You can put IP addresses here if you only want those specific IP address to access this website. For example, if you only want your office to access this website, then put your office IP address here. Keep in mind that, you will not be able to access the server unless you are on the allowed IP address.

allow http and https

Then click DEPLOY and this will take about five minutes.

4. Once your WordPress is installed, login to it and update your User password

If the install is successful, you’ll see your Site address which points to an IP address. Click the IP to test it if your website loads. Then click the Admin URL to login to your admin panel

wordpress ip address

You should also see the Admin user and Admin password. For security purposes, it’s recommended that you update that Admin password by logging on to your WordPress Admin panel. Then go to Users, select the Admin user and update the password from there.

While you are here, you should update any plug-ins, themes and WordPress (if needed). If you already know what theme you’ll be working with, uninstall any unused WordPress theme

5. Assign a static IP address on Google Cloud

The current IP address assigned to your WordPress is temporary. You want to set up a static IP address so the IP does not change, especially if you have to reboot your server or update any of the configurations.

Click the (1) hamburger menu, Then (2) look for VPC network and (3) select IP addresses

assigning static ip

This will show you all your IP addresses, including internal and external IP Address. Select Reserve External IP address.

reserve ip address

Here are the configurations:

  • Name – put a name so you can easily identify which project is assigned to this IP address
  • Description – put a detailed descriptions, especially helpful for other team members
  • Network Service Tier – pick Premium for better performance
  • IP Version – pick IPv4 since IPv6 is still not fully supported
  • Type – pick Regional if it’s a local website or Global if it’s a global website with lots of traffic
  • Region – pick the region where your WordPress VM instance is located. This is something you picked before deploying WordPress.
  • Attached to – pick the VM instance that you want to assign this IP address
  • Click Reserve button

This usually takes less than a minute to finish configuring. You’ll see your new IP address once it’s done configuring. Type the new IP address on your browser to see if your WordPress is pointing to the new IP.

6. Point the static IP address to your domain name

Go to your domain provider. If you have Google Domains, like I do, then go to https://domains.google select DNS and add the following custom resource records.

  • Host Name: put the ‘@’ sign
  • Type: A
  • TTL: 3600
  • Data: <the static IP address you reserved>

Add a second DNS record

  • Host Name: www
  • Type: A
  • TTL: 3600
  • Data: <the static IP address you reserved>

Then click Save

google domains dns settings

Depending on who your domain provider is, these settings could take up to 24 hours to take effect. But if you have Google Domains and you are using the same email account on your Google Cloud, then the configuration would take effect in less than half hour.

7. Set up the bncert-tool for SSL

We are now ready to add SSL (HTTPS on your website).

Go to your Google Cloud then your deployment manager and select SSH

Google workspace ssh

Once SSH has loaded, type this sudo command below. This will run the SSL certification program called bncert-tool which is stored under opt/bitnami folder.

sudo /opt/bitnami/bncert-tool

Then enter your domain under Domain list. You want to put your naked domain, followed by a space and then www.yourdomain.com. Then hit Enter and it will ask you a few Yes or NO questions.

running ssl

Then it’ll show you what’s about to happen, if you are ok with all that, enter Y to agree.

running ssl 2

Then Enter a valid email address, this will be used for any error notifications. And agree to the terms and conditions.

That’s it. Test your website. Any questions, you can put it on the Youtube comment section of my video below.

Watch my step by step instructions here:

Posted

in

by