How to install WordPress on Google Cloud
You are reading this post thanks to Google Cloud. To be honest, I’ve installed this blog “unexpectedly” while testing some features of Google Cloud. Possibility to try WordPress using Google Cloud pushed me finally to fill my empty domain with this blog. It took me just a few minutes.
Few words about Google Cloud
Google Cloud Platform, offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search and YouTube. Alongside a set of management tools, it provides a series of modular cloud services including computing, data storage, data analytics and machine learning (Wikipedia)
You can install WordPress in Google Cloud in a few minutes. WordPress is a part of Compute Engine in Google Cloud. If you want to try it just use Cloud Launcher. You’ll find there WordPress icon.
Using this method you can install WordPress in a few minutes. It will deploy new virtual machine and after few minutes you’ll get web server with WordPress installation. In Google Cloud console you’ll find all credentials (access to SSH, mysql access, PhpMyAdmin, WordPress generated passwords etc).
With recommended WordPress installation you’ll get virtual machine with Apache HTTP Server 2.4.+, MySQL 5.5.+
and PHP 5.6.+. Quick tip, you can use also virtual machine with WordPress certified by Bitnami which is using for example newer version of MySQL 5.7 and PHP7. It is also cheaper but we’ll talk about prices later.
How to install WordPress in Google Cloud
Let’s start from the beginning and install WordPress certified by Bitnami
Go to Cloud Launcher and select WordPress certified by Bitnami.
Click Launch on Compute Engine. You should see the form that is visible on the screenshot below. You’ll see there also price estimation (and like I said, we’ll get to this point (pricing) later. Just make sure to select us-centra1-f and small machine.
Machine type small will give you 1 shared vCPU and 1.7GB which is OK for simple blog. I tried micro (1 shared vCPU, 0.6 GB memory, f1-micro) but this machine was to weak to run my blog without problems. It was working but I’ve got problems with database connections, editing posts sometimes. Just go with small plan at start.
Click deploy and you’ll see that Google is preparing your machine
It will took just a minute and you’ll get all info you need to login to your WordPress installation.
And it’s done! You’ll get URL to your machine and WordPress running. All you need to do right now it to redirect your domain to this URL. Simple, right? With Bitnami version of WordPress you’ll get installation with
Configure your domain and SSL certificate
I’ve create seperate blog post how to get SSL (HTTPS) for your blog for free with Cloudflare: How to get free SSL certificate (HTTPS) for free? If you want to use Cloudflare it’s good to install Cloudflare plugin to your WordPress instance before activating SSL on your domain. This should fix issues with potential redirect loop.
Benefits of hosting your blog on Google Cloud
As always, there are pros and cons. Let’s start from good things.
- Scalability
With cloud you are paying for the CPU usage/traffic. If you are running site with big traffic – it can be quite a good choice.
- Security
- Guaranteed uptime
- Custom configuration
If you want to change defaults (Apache, PHP parameters etc), some server settings, it’s not always possible when you are at shared hosting provider. You have the complete control over what you want to do with your machine instance. You don’t have to depend on a single shared server to host your site.
Pricing
I don’t want to put “pricing” to cons (right now). For small blog, probably it’ll be much more expensive than a standard shared hosting you can get. Let’s be honest – Google Cloud wasn’t created only to serve WordPress blogs and it’s not the best example to showcase it.
I want to git it a try for a few months and we’ll see. Right now with small machine current pricing plan is not the cheapest solution you can get. I read that it’s possible to optimize g1-micro virtual machine for sites like this (with very low traffic).
Updated: 23.07.2018
I switched to micro plan and I’m able to host my blog without any cost right now.