WordPress Migration to Google Cloud (Full Guide)

By Cronos Editorial Staff on Apr 23, 2022
Est. Reading: 5 minutes

So you want to host WordPress on Google Cloud?

This guide will take you step-by-step through the process of deploying a WordPress website to Google Cloud.

Let’s get started!


In this introductory section of the guide, you will learn about the pros and cons of moving to Google Cloud. You will also learn about the costs of hosting WordPress on Google Cloud, including the importance of deploying a solution that balances efficiency with performance.

After you’ve read through this introdution, the guide will then walk you through the process of deploying a WordPress website to Google Cloud.

Why host WordPress on Google Cloud?

Google Cloud is an excellent platform for hosting WordPress websites that require scalability, resiliency, and performance.

Hosting WordPress on Google Cloud means your website is powered by the same global network that powers Google.

The #1 reason why you should host WordPress on Google Cloud is because you’re developing a website that you predict will grow in size and complexity over time, and you require a highly-scalable infrasture that can grow with your website.

Below is a list of pros and cons to consider when determining whether to host your WordPress website on Google Cloud:

  Pros of Google Cloud hosting

  1. Significantly Increased performance
  2. Virtually unlimited scalability
  3. Highly cost-effective for large projects
  4. Greater control and flexibility
  5. Native integration with Google products

  Cons of Google Cloud hosting

  1. Steep learning curve for beginners
  2. Requires significant time investment
  3. No customer support options included
  4. Greater risk exposure for new users

Cost of Hosting WordPress on Google Cloud

The cost of hosting WordPress websites on Google Cloud (compute engine) varies widely, and depends on many factors. Generally, the cost ranges between $1-$30 per month for typical WordPress websites.

Balancing efficiency and performance

When selecting the infrastructure to use for hosting your WordPress website on Google Cloud, it’s important to understand the need for balancing efficiency and performance.

Below is a side-by-side comparison of an efficiency ($0.08/month) vs. performance ($29.71/month) based configuration for hosting WordPress on Google Cloud.

A side-by-side cost comparison of an efficiency vs. performance configuration for hosting WordPress on Google Cloud. Use the Google Cloud Pricing Calculator to determine the costs of various configurations.

Efficiency Configuration

The efficiency configuration is optimal for low-traffic websites (under 1000 daily users). This configuration takes full advantage of Google Cloud’s generous Always-Free Tier, which provides an f1-micro instance, as well as 30GB of HDD persistent disk storage, all at no cost.

This strictly efficiency-based model will allow you to host your WordPress website on Google Cloud at a very low cost, however, larger websites strictly adhering to the efficiency model may incur performance issues.

Performance Configuration

The performance configuration is optimal for websites with higher traffic volumes (over 1000 daily users). However, unlike the efficiency configuration, neither the n1-standard instance nor the 30GB SSD persistent disk are covered under Google’s Always-Free tier.

This strictly performance-based model will allow for your website to out-perform the efficiency model, especially under heavy load. However, low-traffic websites that utlize this configuration may be allocating resources inefficiently.

Which configuration should you choose?

One of the benefits of migrating to Google Cloud is that you can take advantage of their ‘pay-as-you-go’ model, which means only paying for the resources that your website requires, and nothing more. That being said, a good rule of thumb is to start small, and upgrade only when necessary. To determine whether upgrading is necessary, you will need to monitor your instance’s performance metrics.

To access your instance’s performance metrics, start from the Google Cloud sidebar menu and navigate to Compute Engine > VM Instances, then click on your instance. From here, you’ll see a Monitoring tab at the top of the page, which links to a dashboard displaying your instance’s performance metrics.

Compute Engine contains a Monitoring dashboard complete with graphs of your instance’s performance metrics.

The most important metric to assess the performance of your instance is CPU usage. CPU usage consistently under 60% is ideal. If CPU usage is consistently over 60%, you may want to consider upgrading your machine size.

In addition to CPU usage, you’ll also want to monitor the free space available on your persistent disk. To check available disk space, use the df command.

Part I – Configure WordPress

In this section of the guide, you will deploy a WordPress website on Google Cloud using the efficiency configuration, which consists of an f1-micro instance and a 32GB HDD persistent disk, at an estimated cost of around $1 per month.

1. Deploy WordPress

From the Google Cloud sidebar menu, navigate to Marketplace.
From the Marketplace dashboard, type WordPress into the search field, then select WordPress Certified by Bitnami and Automattic.
Click on the LAUNCH button to begin configuring your WordPress instance.

2. Customize Deployment

Modify your instance configuration according to the settings above, making sure to change the Zone to represent where most of your website’s visitors are located. You can also upgrade the Machine type and/or Boot disk size in GB accordingly. Finally, click on the Deploy button to deploy your WordPress instance.

Part II – Configure Domain

Now that your WordPress instance has been deployed, you will configure a domain name for your new WordPress website. Although the tutorial uses Namecheap as the domain name provider, the configuration is universal and will work with any domain name provider.

3. Copy Instance IP Address

Navigate to your VM Instances dashboard and copy the IP address that has been assigned to your WordPress instance.

4. Enable DNS Settings

From your web browser, navigate to your domain name provider (we recommend Namecheap). Navigate to the settings page for your domain, and select Namecheap BasicDNS from the NAMESERVERS row.

5. Create DNS Record

Next, click on the Advanced DNS tab at the top-right of your domain name dashboard. Then, in the HOST RECORDS row, create a new A record as shown in the image, however, remember to replace the IP address in the image with the IP address of your instance (which you copied in a previous step). Next, create a CNAME record as shown, but remember to replace domain.com with your own domain name.

Part III – Configure SSL

Now that your website’s domain name has been configured, you will learn how to enable SSL for your domain name. To do this, you will connect to your WordPress instance via the SSH terminal, then execute a script which will automate the process of configuring SSL for your website.

6. Connect to WordPress Instance

Return to your VM Instances dashboard, and click on the SSH button in order to connect to your WordPress instance.

7. Execute SSL Script

Now that you’ve clicked the SSH button, a new terminal window will open displaying the connection to your WordPress Instance. Copy the command in the box below, and paste it into the terminal window, then press Enter.


After you’ve pressed Enter the script will prompt you with a series of questions, which you will answer by entering either y (for yes), or n (for no). We recommend answering each question in the following way, remembering to replace each bolded instance of Cronos with your own domain name or email:


Next Steps…

Well done! You’ve successfully deployed a fully-functional WordPress website on GCP, however, there are still some very important concepts that need to be covered. In this Next Steps… section of the guide you will learn how to retrieve your login credentials and login to your WordPress website, and optionally import an existing WordPress website.

8. log in to WordPress

From the Google Cloud sidebar menu, navigate to Marketplace.
From the Marketplace dashboard, click on Your solutions.
Select your recent deployment from the list.
Next, copy both the Admin user and Admin password (Temporary) from the list. You will use these credentials to login to your WordPress website in the next step.
Visit your WordPress login page, and use the username and password that you copied from the last step to log in to your website.

Related Posts

Leave a Reply

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