Today we’re going to take a look at how to install WordPress as a one-click image in Google Cloud – Google’s very own cloud infrastructure. Among the major cloud providers in the market, Google has one of the most competitive pricing policies compared to Amazon Web Services and Microsoft Azure. It’s cloud network is powered by Google’s own infrastructure that handles over 40,000 search queries per second.
One of the things I love about WordPress is it’s widespread popularity. Thanks to this very reason, almost every cloud computing company provides its users with a “one-click installation” of WordPress. Some call it an “app”, while others call it a “template” or an “image”. Call it what you will – but the most important fact is that setting up WordPress in the cloud takes only a few clicks.
NOTE: One important point before we begin. If this is your first time installing WordPress in the cloud – i.e. from an actual cloud provider, please don’t host your live website right away. I suggest you test everything for at least 2-4 weeks before migrating your WordPress blog or website to the cloud.
WHY? Cloud providers like Google Cloud, AWS and Microsoft Azure only have limited support for your WordPress website. If you run into a plugin conflict or some hosting or malware issues, you’re going to have to solve it yourself.
Luckily, there’s a solution for you. You can either:
- Go for a third party managed cloud provider like Cloudways (Check out our review) or
- Go for managed WordPress hosting like WPEngine (we at WPExplorer use WPEngine and love it!)
Some Technical Tea
There are a few basic terms we need to learn before we get with the tutorial. The idea behind this is to inform you of all the various products Google Cloud has to offer. Once you develop and interest in something you see, you can start building your own apps in them!
Projects
Project Dashboard
Anything and everything that you want to do in Google Cloud is enclosed (or encapsulated) within a project. Inside a project, you can use or deploy the various sub-products Google Cloud has to offer. They include App Engine, Compute Engine, Google APIs, Google Cloud Storage, BigQuery, or directly install a pre-built solution. (More on this a bit later)
Billing Accounts
Each project that you create must be linked to a billing account. Google Cloud allows you the flexibility of having multiple billing accounts – each of which can use a different credit/debit card. The idea behind this is to implement the pay-as-you-go policy of the cloud computing environment.
NOTE 1: You cannot use a prepaid credit/cash card in your billing account. I’ve tried this and my account along with all projects linked it was temporarily blocked. I immediately removed the prepaid card, and changed it to a valid credit card. The account was re-enabled after a few working days.
SERP for “Google Cloud Trial” from Google.com
NOTE 2: Google is currently offering a $300 USD trial to anyone who signs-up for Google Cloud. Now you’ve got no excuse to not try Google Cloud haha!
Google Cloud Products
We talked about the various sub-products Google Cloud has to offer. Let us now take a look at each of them.
Google App Engine
Google App Engine
Most software is built using a particular language and (optionally) based on a framework. A classic example would be a to-do list app, which is built on JavaScript and based on the jQuery framework. jQuery, as you can guess, is a framework for JavaScript, which is the language.
Similarly, loads of apps are written in popular languages like Python, Java and PHP. Each of these languages require an initial setup on the host system, in order to run the apps written in that particular language. For example, apps written in Java requires the Java Virtual Machine (JVM) to be installed in the target system.
Google App Engine takes care of this very task. It installs and configures these languages in it’s cloud infrastructure, so you can simply upload you code and get on with the development process. You don’t have to worry about setting up the language, or scaling the host system for your app. Google Cloud’s load balancing algorithms automatically take care of it. With Google App Engine, you simply need to select which language you need and deploy your app in it.
Google Compute Engine
Google Compute Engine (GCE)
Google Compute Engine (GCE) is another name for virtual machines in the cloud. Each VM is treated as an instance of a GCE. VMs can run almost any software you want it to. It offers more flexibility than App Engine and is intended for personalized environments.
Google APIs
Google APIs
Google has over 100 APIs for its multitude of products. This cloud feature allows you to access these APIs.
Cloud Storage
Google Cloud Storage
As the name suggests, Cloud Storage allows you to save large volumes of unstructured and semi-structured data, called datasets, with high-availability (basically geeky terms for Big Data applications).
BigQuery
Google BigQuery
BigQuery is Google’s own implementation of a language suitable for handing big data. Although this is not even remotely related to our tutorial, it is a fascinating thing to experiment with!
Pre-Built Software Packages
List of one-click installation images
This is where the fun begins! Forget all those complicated terms. Google has complied a list of the most popular software, frameworks and languages and offered them as pre-built software packages. Guess what?
WordPress is one of them!
Remember we discussed that each of these languages are installed in a virtual machine (or an instance of Compute Engine)? Well, the same holds here as well. When you create or a WordPress software package, you’ll first have to select a virtual machine, its size and region in order to proceed with the installation. The software package is essentially a set of instructions that installs the respective software in a newly created virtual machine.
Installing WordPress in Google Cloud
Phase 1: Finding your way
Create a new project
Step 1: First, you need to create a new project. You can visit Google Cloud Console to get started.
Add a billing account
Step 2: Add a billing account to the project. You can also choose the desired data center. Currently Google Cloud has two major data centers for Google App Engine – US and EU. In this tutorial, I’ve chosen the US data center. Select Create to continue.
New project creation completed (indicated by green tick)
Step 3: Now, a project will be created. Upon completion, you’ll get a notification as shown in the screenshot above.
Finding the Deployment Manager
Step 4: Now we must find the page that shows the list of pre-built software packages, aka the Deployment Manager. You can do this in three ways:
- 4.1 – From the menu on the left, select Deploy & Manage > Click to Deploy
- 4.2 – Select the banner next to #2, as shown in the screenshot above
- 4.3 – Click here for WordPress for Google Cloud
WordPress as a one-click deployed image
Step 5: Once in the page, you’ll see a huge list of software. Scroll down and select WordPress (for now). You can play with the rest as much as you want later! 🙂
Phase 2 – Installing and configuring WordPress
Step 6: Okay, so now you’ve finally located WordPress installation option. Time to get cracking. Select Deploy to start the process.
WordPress Installation Parameters on Google Cloud
Step 7: This here is a crucial step. Let’s dig in. Please refer the screenshot at every step.
- The Deployment Name can contain only alphanumeric characters.
- In Zone, there are three major zones – US, EU and Asia. In this tutorial I’ve chosen us-central1-f. You can choose any zone you like.
- The Machine Type is directly proportional to the amount of power you need. For experimental purposes, a n1-standard-1 machine instance would do. It’s got 1 virtual CPU (vCPU) and 3.7GB of RAM, which is more than sufficient to try WordPress.
- I’ve chosen the Disk Type as SSD Persistent Disk. This is because SSDs are 5 to 10 times faster than traditional HDDs.
- The minimum Disk Size is 10 GB, which is sufficient.
- The Administrator Email should be correctly entered.
- Check the Install phpMyAdmin and Enable Google Cloud Monitoring options.
- Leave the rest of the settings as is.
- Click on Deploy WordPress to begin installing WordPress.
Deployment Manager setting up WordPress
Step 8: Google Cloud’s Deployment Manager will now create the selected instance and install WordPress on it.
Access credentials shows post installation
Step 9: WordPress in now installed. But that’s just 70% of the process. Now we have the following tasks lying ahead of us:
- Note the WordPress admin password
- Note the MySQL and phpMyAdmin password
Allowing HTTP and HTTPs traffic
Phase 3: The home run!
Step 10: Now we need to allow external HTTP and HTTPS traffic to pass through our WordPress server’s IP address. (Google Cloud disables this by default for security purposes). In other words, we’ll need to add a firewall rule for our assigned IP address.
To do this, click on the server’s IP address located under External IP. A dialog box should open. Select both Allow HTTP and HTTPS traffic to pass through your server. Click on Apply to commit the changes.
Firewall rules updated successfully
Once the firewall rules are successfully updated, you should be able to access WordPress from the given IP address.
WordPress is served
Conclusion
If you’ve noticed, we haven’t seen any screenshots for the famous five-minute WordPress installation – you know the configuration phase where you set your websites’s name, username, password, etc.?
Well, Google Cloud’s one-click WordPress deployment script eliminates those steps and configures them with default values. You should head over to the WordPress settings and change them you your desired values.
Try WordPress on Google Cloud ($300 Free Trail)
I hope you enjoyed this tutorial, as much as I’ve enjoyed writing it. If you have any questions or suggestions, please leave them in the comments section below or tweet me at @souravify – Thanks for reading! Happy trails.