How to host WordPress website on Google Cloud in 8 Minutes

How to host WordPress website on Google Cloud in 8 Minutes

since google start giving away free
credits hosting website on 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 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 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 is 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 or 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 marketplace from here 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 is limited for f1-micro I recommend you to use a
lightweight web server like OpenLightspeed instead of Apache
let’s select open Lightspeed from marketplace and click Launch on compute
engine here you can rename the deployment if you want. 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 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 select 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 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 click the SSH button on your instance then you will be asked to enter your
domain name 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 customizing 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 stackdriver 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 Stackdriver. 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

22 thoughts on “How to host WordPress website on Google Cloud in 8 Minutes”

  1. Below are the stats of my website. The f1-micro instance can handle 100K visitors/month easily. That's incredible amount of traffic for free tier!

  2. how to solve ddos issue that can skyrocket cost of hosting such website on gg cloud? there are lots of tjreads on stackoverflow of people that had such problem and got high bill's

  3. Just stopped after clicking "Create" on "VIM Instance" (1:27). After that I noticed on the right handside it said: "$24.67 monthly estimate". Not sure what they base the estimate on, but somehow I doubt this amazing service will be "free", at least for very long πŸ™‚ Have a great day.

  4. I can’t get it to work. Your tutorial is a bit too advanced for a non technical WP user. For example at 0:05:02 when you say; update the DNS setting to point to the VM instance IP address, I don’t know how to do that πŸ™ would be nice to have a tutorial on that too

  5. Hi, good! Alternatively, as hosting I recommend siteground!

  6. NIce tutorial, but I am having a problem while I update the packages in SSH, I can't get access to my wp-admin and I get the message that the connection is not private and I actually am stuck.
    I have tried it so many times and I don't know what to do to go on.
    Hoping for an answer
    Thanks in advance

  7. I'm wondering if you can create several instances and then point other domain names to these instances? All from your account? Something like reseller hosting where you host several websites from one account

  8. Okay, this is way more complicated than just buying a WebHost. Not worth it for someone like me who just wants simplicity when building websites.

  9. Hello Sir

    I would like to say thank you so much for this great tutorial. I did all of the steps which u taught in the training for running a wordpress bitnami website on googe cloud platform.

    But i did all of the steps for wordpress bitnami multisite and i got a problem in one step which is adding a ssl certificates for my seconday domains websites like "". My primary wordpress multisite which is ""got a successful ssl security but the other secondary websites didnt get this ssl certificate.

    I would like you to visit my secondary subdomain website "" and I would be thankful to you if u make a tutorial to how to fix it etc…

    Once again thank you so much for the step by step tutorial

  10. Do you know if it's possible to create a mail-account using Google Cloud. Not sure how it would work with this, basically I want people to be able to send a mail to [email protected] using this service.

Leave a Reply

Your email address will not be published. Required fields are marked *