How to host WordPress website on Google Cloud for free

Since Google started giving away free credits hosting a website on a google cloud platform is really interesting especially if you are a small to medium traffic website and this video will show you how to set up a WordPress on GCP in just a few minutes let’s check it out here’s the Google cloud platform ( gch ) and if this is the first time for you you will be asked to create your first project but since I already hosted my website on this platform.

How to host WordPress website on Google Cloud for free
Google Cloud free hosting ( gch ) WordPress sites

I’m going to create a new project for this tutorial and we need to wait for a few seconds before we can switch to the new project let’s head to the compute engine section and select VM instance here you can create your own virtual machine as your server.

It’s almost the same as purchasing a VPS package from web hosting but this time you have full control and ability to scale or upgrade it later the downside is you will have to manage it by yourself which requires some technical background and there are no convenient tools like cPanel or Plesk from here there are two options to set up your instance you can create your virtual machine here and install all the packages by yourself.

You can use the deployment solution provided on a marketplace for this tutorial we will go with the easy way and use the existing solution let’s head to the deployment manager and select deployment then click go to the marketplace from where you can choose the existing solution to deploy on your project.

For example, if you want to host a web site using Apache you can deploy a LAMP stack solution which will create an instance for you and also install all the required packages now since google has a free tier that let you use the smallest VM instance like f1-micro for free this tutorial is going to focus on staying under that condition and since the CPU and RAM are limited for f1-micro.

free hosting
Google Cloud Free Hosting ( gch ) WordPress Sites

I recommend you to use alight weight webserver like Open Light speed instead of Apache let’s select an open Light speed from the marketplace and click Launch on compute engine here you can rename the deployment if you want.

The zone is where your VM instance will be placed you can change Zone to match the website audience but remember that free tier allows only US zone next is the VM instance here you can select machine type with suitable CPU and RAM but for small to the medium static website, the f1-micro should be enough for most cases.

Next is the disk size which is default to 10 gigs but since free tier allows up to 30GB so why not. Then make sure you allow our web traffic on fire or setting then click deploy and wait for a few minutes now the deployment has finished next we will reserve the static IP address for our server go to our VM instance and select view Network detail then selects the external IP address you will see that our current IP type is ephemeral which means it will change over time so let’s change it to static if you go to this IP address on the browser now it will tell you to set up a server of its secure shell first so let’s do it you can connect by clicking the SSH button on your instance then you will be asked to enter your domain name.

gch
goole cloud hosting ( gch )

I’m going to skip the SSL setting for now finally update a server to the latest version this will take five to ten minutes so in the meantime let’s set up the WordPress by go to your IP address select the language and create a WordPress admin user and that’s it your WordPress is ready.

You can login and start customising your website now then update the DNS setting to point to this VM instance IP address and your website is ready with the current setting it should be able to take on around thousand users per day easily and even more if you use CloudFlare or cache plug-in but since our server’s RAM is quite limited it’s best to also turn on a swap file this is to allocate some disk space to be used as memory when Ram is running low first view allocate a file with 1 gig size then set the file permission then select our file to be used as a swap and then turn it on our swap setup is complete but this is only temporary.

If you restart the server it will be gone so we need to write a setting permanently now to keep track of CPU and RAM usage you can view it in stack driver for some resources like CPU you can view it right away at for RAM you need to install an agent first you can use Google provided commands you pull the install script and execute it the install is complete but if you check the status it will fail this because we need to enable the meta setting of our instance first head back to the VM instance and click Edit unchanged monitoring metadata from 0 to 1 then we start to service and check the status again now it’s running you should see a checkmark in a Stack driver.

Google Cloud gch
gch

To view RAM usage select resources and metrics explorer first enter GCE VM instance as resource type then select memory usage now you can see your search statistic report at any time and that should cover the basic steps if you liked this video don’t forget to subscribe for more tips and tutorials thanks watching and see you next time bye.

This Post Has One Comment

Leave a Reply