How to host WordPress website on Google Cloud in 8 Minutes
Articles,  Blog

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

Leave a Reply

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