How to set up a free WordPress CMS on Google Cloud Platform
Tags: wordpress, showdev, headless, cloud
Published: 2020-05-09 14:02:30

The price of hosting a WordPress site can vary a lot. A lot of hosting platforms charge about 10+ USD for a basic WordPress installation on a shared server.

But there's a cheaper solution. It's even **free**, if you don't have too much traffic and want to use it for a personal site or your side project.

The trick is to use a cloud provider. Like Google Cloud Platform (GCP) or Amazon Web Services (AWS). The web interface of these Cloud Provider may seem overwhelming, but I will show you a simple and secure way to set it up.

*Note: This guide is best suited for hobbyist/professional programmers. This may get more complicated in the long run. So if you are not a technical person, I suggest you should stick to a more expensive and convenient hosting provider.*

## Google Cloud Platform

When you visit the Google Cloud Platform for the first time, you will see this screen.

![First Screen](https://simonhalimonov.com/static/1645f23836a57cf4387505024efcdb0a/447c0/image-14.webp)

Choose your country and agree to continue at this point. Then continue to the marketplace by using the sidebar on the left.

![GCP Marketplace](https://simonhalimonov.com/static/8eb050ed21d9ef86234d2a40da2a8f42/447c0/image-16.webp)

Type in WordPress and you will get about 40 results.

![GCP Marketplace Results for WordPress](https://simonhalimonov.com/static/9d68e0258eb80b6f69df19a6d316f772/447c0/image-18.webp)

These are all different Virtual Machine (VM) configurations. They are preconfigured to serve all kinds of different use cases. Big international WordPress websites that use extremely powerful VM networks. Enterprise websites with high security. Or extremely efficient ones that you can use for free.

To simplify this process, we will use the standard one provided by Google.

![Basic 1-Click WordPress installation from Google](https://simonhalimonov.com/static/66d18ac305641782bb43746403178903/e2264/image-19.webp)

On the details page you will see a cost estimate.
Estimated costs: $13.61/month. 💵

![Details page for Google 1-click WordPress installation](https://simonhalimonov.com/static/fa50bc46b0971569b981fc8ab4b8b391/447c0/image-20.webp)

But wait. Didn’t I say it was free? 🤔
Yes! The estimated costs are for a g1-small virtual machine instance. This instance has 1 shared vCPU + 1.7 GB memory.

Well, there is a smaller one. The f1-micro is the lowest VM instance you can get and it is included in the free tier of GCP. So it’s completely free.

Hit the big blue launch button and it will ask you for your details. Enter those details and continue.

Almost done. There are 5 steps on this page.

![Deployment settings](https://simonhalimonov.com/static/2bf68e71b14214008d3d8c4f1bfadac7/447c0/image-21.webp)

1. Select a zone in the US (Do not use us-east4)
1. Select a micro machine
1. Enter an E-Mail address
1. Scroll to the bottom and hit deploy.
1. Wait for the deployment to finish

When the deployment of the VM has finished, you will see all the details for your own server and WordPress Installation.

![Deployment status and results](https://simonhalimonov.com/static/e75ab04091638fb1e0fba25d2fc1d85a/447c0/image-22.webp)

With the automatically generated passwords you can log in into your WordPress installation and do whatever you want with it.

---

## Conclusion

Setting up your own WordPress VM on a cloud provider is not as hard as you might think. And it’s free. There is almost no reason to not do it.

I personally use it for a free headless [WordPress CMS with GatsbyJS for my personal site](https://simonhalimonov.com/). The static files are hosted on [Vercel.com](https://vercel.com/) for free. Doing this gives me a blazing fast website with unlimited traffic, because the WordPress installation never gets direct traffic.

### Next steps

Here are a couple things you can do to get comfortable with GCP

1. Set up an automatic snapshot backup, so you don’t have to worry about loosing anything.
  1. Set it to every day and delete after 3 days.
1. Create another instance
  1. Try the openlite-speed VM for WordPress
1. Connect via SSH
  1. Generate a key
  1. Upload it under Compute Engine > Metadata
  1. Use ssh <USERNAME>@<IP_ADDRESS> to connect