Back in the day when you evaluated hosting plans to power your WordPress website, most companies offered the regulars – shared, dedicated, managed, and VPS.
Your site would be hosted on a server within the hosting provider’s data center and that was all there was to it.
Unless you’ve been hiding under a rock for the past few years, you’ve probably heard the term cloud computing or the cloud thrown around a bit.
In this post, we’ll walk you through a step by step tutorial on how to install your WordPress website on Google Cloud and compare it to other cloud environments.
Let’s put everything into context before we begin.
What is The Cloud?
The Cloud, often used in place of cloud computing, refers to the delivery of computing resources over the Internet. Users can get access to just about everything from web applications to data centers. A cloud environment also enables webmasters to host their websites in a cloud infrastructure spanned across multiple servers.
In a nutshell, the cloud is a network of servers that can be used as Software as a Service (SaaS), Infrastructure as a Service (IaaS) and Platform as a Service (PaaS).
When we talk about installing WordPress on the cloud, we are basically hosting it through a cloud infrastructure service such as Google Computer Engine, Microsoft Azure, or Amazon Web Services (AWS).
Why you should install WordPress in a cloud environment
As you can probably already tell, the cloud is an incredibly powerful alternative to traditional web hosting services. It offers three key benefits to webmasters:
- The biggest advantage of hosting your website on the cloud is that it caters to traffic spikes effortlessly. Cloud computing makes dynamic scaling a reality which basically means that your site will be able to accommodate a significant traffic spike (over the holidays, special discounts, or limited time sales) without running up a bill for additional resource consumption.
- Uptime, guaranteed. Since the cloud is basically a network of servers, you can rest assured that your site won’t face downtime. Once you host your website, the data is copied across multiple servers. This means that if Server A was down for maintenance then your site would be served from Server B without facing any downtime.
Installing WordPress on Google Cloud
Those of you who are technically inclined can leverage Google Compute Engine (Google Cloud Platform’s IaaS) to host your WordPress website. In this section, we’ll show you how to do just that.
Note: If you don’t already have a billing account set up with Google Cloud Console, you’ll have to do that before you get started.
Creating a new project
To start things off, let’s create a new project in the Google Cloud Console which we’ll use to install our WordPress site on.
Step 1: Log in to your Google account and navigate to the Google Cloud Console.
Step 2: Hover over the Project drop-down menu on the left side of the console dashboard and click Create project.
Step 3: In the following pop-up screen, fill in the project details.
- Project name. I’ve called my project WordPress on Google Cloud.
- Billing account. Select your billing account.
- App Engine location. This allows you to choose the location of your hosting application. I’m going with US Central (us-central).
- By selecting this option you will receive updates via email.
- Terms and Conditions. Be sure to read the terms and conditions and then tick Yes.
Step 4: Click the Create button once you’re done.
Step 5: Navigate to the Library tab and click on the Cloud Deployment Manager API under Google Cloud APIs (Library > Google Cloud APIs > Cloud Deployment Manager API).
Step 6: Click on Start with a prebuilt solution to continue.
Step 7: Navigate to the Cloud Launcher and click on WordPress under the CMS section.
Step 8: Click the Launch on Compute Engine button to proceed.
Now that we’ve created a project, let’s move on to installing WordPress on the Google Cloud.
Step 9: In the following screen, you’ll find a Deploy button. Click it to get started with the installation process.
Step 10: Fill out the WordPress deployment form to continue:
- Deployment name. Give your WordPress deployment a name here. I’m calling mine WordPressOnGCP.
- Since we selected us-central back in Step 3, we’ll go with us-central1-f here.
- Machine type. Select a machine type based on how much power you estimate you’ll need. I’m going with the n1-standard-1 machine type.
- Disk type. Select a disk type of your preference.
- Disk size in GB. Select a disk size for your WordPress install. Generally, the minimum 10 GB is enough.
- Administrator Email. Enter your email address in this field.
- Install phpMyAdmin. Make sure this option is checked; phpMyAdmin is necessary for WordPress.
- Enable Google Cloud Monitoring. It’s a good idea to keep this field checked if you want reports.
- Server name prefix. The default server name prefix is wordpress. You can change it if you’d like but it’s recommended to leave the default value as it is.
- Network name. The default network name is default. Leave this field as it is.
Step 11: Click on the Deploy WordPress button to begin the installation.
Step 12: Once your deployment is ready, you’ll be redirected to the Deployment information screen which contains the WordPress administrator username and password, MySQL administrator password, and phpMyAdmin username. You will need to save these credentials in a text file.
Configuring HTTP/HTTPS traffic
By default, Google Cloud doesn’t allow HTTP traffic and HTTPS traffic to pass through. In order to enable this option, we’ll add a firewall rule for the external IP address of our deployment instance.
Step 13: Click on the External IP address under the WordPress server section.
Step 14: In the following pop-up screen, check both the Allow HTTP traffic and Allow HTTPS traffic options.
Step 15: Click the Apply button once you’re done.
Step 16: Enter the IP address into your browser’s URL and you will be redirected to your brand new WordPress site.
Now, we were only able to cover the basics of how to get WordPress installed on Google Cloud. The next step is to setup your domain name and DNS settings.
This means you can access your site from yourdomain.com rather than an IP address.
Fortunately, Google has a tutorial that explains how to do this – step by step. Click here to check out the tutorial.
Hosting websites on the cloud has become tremendously popular over the past few years. Their powerful range of features extends from catering to unexpected traffic spikes to guaranteeing near-perfect uptime for your website.
We walked you through a tutorial on how to install WordPress on the Google Cloud. Hopefully, you’re in a good position now to take things further yourself.