This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Try the fastest hosting platform with pay-as-you-go pricing & 24/7 expert support! MIGRATE NOW →

How to Host WordPress on Google Cloud Hosting

Updated on June 1, 2022

14 Min Read
host WordPress on Google Cloud

In this article, I will show you how to host a WordPress site on a Google VM instance, and then take you through the details of installing WordPress on a Cloudways-managed Google cloud server.

The first method is somewhat technical and requires an intermediate level of expertise in running Linux commands and a basic understanding of various stacks. Managing a Google server also involves complex tasks such as patching, OS upgrades, firewall configuration, and backups requiring manual execution by the system administrator or server owner.

With the second method via Cloudways, though, you can instantly deploy your server and install your WordPress application in a few clicks. Cloudways is a managed cloud hosting platform that offers the choice of hosting your apps on Google cloud servers, thanks to an easy-to-use platform. The integration of GCE with Cloudways opens up a new world for managed WordPress hosting offering reliability, speed, and incredible uptime.

Before diving into the processes, it would be good to understand why a Google cloud server is a great option to host your WordPress site. When it comes to Google Cloud hosting, why do people prefer a managed WordPress hosting like Cloudways over a native Google cloud web hosting?

Why Host WordPress on Google Cloud

Google Cloud is one of the most sophisticated, reliable, and fast cloud infrastructures used by mammoth companies such as HSBC, Twitter, PayPal, and Bloomberg for their hosting requirements.

Here are some of the reasons why Google WordPress hosting might be the right fit for your websites:


Optimal server uptimes are non-negotiable for big eCommerce stores, trading sites, and news sites -e even a slight interruption in the service can cause serious monetary damage. Google Cloud Engine is available for more than 99.9% of the time.


We all know that Google (almost) runs the Internet, so you have to be on top of your game to rank at the top in Google SERPs. With speed being one of the most important ranking signals Google uses to rank websites in the SERP, Cloud hosting allows WordPress websites to be faster.


GCE uses the same infrastructure as Gmail and YouTube. When was the last time you experienced downtime watching videos on YouTube or sending emails in Gmail? That’s right, never.

What this means is that by hosting your website on Google’s cloud infrastructure, you are hosting on the most well-maintained hardware and data centers available.

The team behind Google Cloud works tirelessly to improve its services and ensure better performance than its competitors. They do this by automating configuration changes, using an extra layer of verification to discover any potential problems, and closely monitoring the impact of modifications on the infrastructure.


GCE servers are highly scalable and can handle unexpected traffic spikes with ease. They also let you upgrade or downgrade your server size without changing the IP address. When on Cloudways, you can also monitor your server performance and scale up your server accordingly. There are numerous cloud infrastructure monitoring software that allow users to monitor the performance of their servers.

Accelerate WordPress load times by 70%!

Host WordPress on Google cloud for the best performance!

Types of Google Compute Engine Families

There are four types of GCE machine families and each offers a unique value proposition. These powerful servers are categorized according to their pricing, performance, and nature of the workload.

Following are the detailed explanations for GCE machine family types to help you understand and choose the best for your desired WordPress site project.

1. General Purpose Machines

This type is mainly focused on cost-performance so you will find various GCE machines and series. On the basis of cost-performance, General Purpose Machine types are further categorized into three more types; cost-optimized, balanced, and scale-out optimized.

Cost-optimized GPMs (E2): The E2 virtual machines are known as cost-optimized GPM and these servers are designed for day-to-day computing. These machines are cheaper compared to any other family/type, and you can use E2 VMs for websites, applications, small-medium databases, and other microservices.

  • E2 Standard
  • E2 High Memory
  • E2 High-CPU
  • E2 Shared-Core

Balanced GPMs (N2, N2D, and N1): This category consists of a wide variety of machine types and series. They’re a good fit for medium-large scale WordPress sites or online businesses.

  1. N2:
    1. N2 Standard
    2. N2 High Memory
    3. N2 High-CPU
  2. N1:
    1. N1 Standard
    2. N1 High Memory
    3. N1 High-CPU
    4. N1 Shared Core
  3. N2D:
    1. N2D Standard
    2. N2D High Memory
    3. N2D High-CPU

Scale-out Optimised: These are high-performing machines that focus mainly on scale-out workloads. These machines are ideal for web services, containerized microservices, media transcoding, and more.

2. Compute Optimized Machines (C2 and C2D)

CO machines are great for large-scale WordPress businesses that need high computing resources. These are ultra-high-performing machines that can easily handle any size and nature of WordPress sites.

  1. C2D:
    1. C2D Standard
    2. C2D High Memory
    3. C2D High-CPU
  2. C2:
    1. C2 Standard

3. Memory Optimised Machines (M1 and M2)

This machine family is ideal for high intensive database workloads where memory is more important than the number of CPUs. Here, you will see two types; M1 and M2. M1 is ideal for large in-memory databases, and M2 for large in-memory databases.

4. Accelerated Optimised Machines (A2)

This is a new machine family that is ideal for high computing workloads, machine learning, deep learning, and more where you require high computing power. Unlike other family types, here the machine types are distinguished on the basis of GPU count.

Considering all the above GCE family types and your WordPress business, Cloudways offers three types of cloud servers.
For small-medium WordPress sites and online stores, it offers E2 machines.
For medium-large WordPress sites and online stores, N1HC machines.
For large scale and performance-oriented WordPress sites and online stores, C2 machines.

Just as Google Cloud Engine categorizes its offerings for diverse requirements, our Web Hosting Pricing Calculator streamlines your hosting decisions. It formulates personalized recommendations for the optimal server size based on your traffic and compares the top hosting providers.

Why Cloudways for Hosting WordPress on GCE?

Well, if you have no prior hands-on cloud server management experience and you opt for hosting WordPress on Google Cloud-native platform, you will be sailing in some pretty dark waters.

Using GCE is not easy for the average WordPress user. There is a lot to do even before installing WordPress on it. You have to purchase an instance of web hosting on google, and then create an SSH connection.

Yeah! I know I lost you there.

Simply put, the process is lengthy, and many things can go wrong. And if the process breaks down, you have to start all over again! Fun? Not really!

Cloudways makes it easy, though! Just sign up, and in a few minutes, you’ll have a Google Cloud server waiting for you with WordPress installed on it.

You don’t have to take my word for it. Look at the feedback and scores when a user launched WordPress on Google Cloud with Cloudways.

cloudways google cloud review

How to Install WordPress on Google Cloud Hosting

In this method, I will deploy a LAMP (Linux, Apache, MariaDB, and PHP) stack on a Google VM Instance and install a WordPress application over there. Therefore, the first thing you need to do is create an account on Google Cloud Platform, and after that, you need to verify your account by adding your credit card number. The signup process is simple, so I will skip it and assume that you have already created a new account.

So let’s get started!

Create a New Compute Engine VM Instance

Once you have verified your account, you need to open Navigation Menu > Compute Engine > VM Instances.

create a new compute engine

Currently, you will see no VM instance on your GCP, so simply click on Create.

create a new vm instance

On the Create an Instance screen, you can choose the server configurations and other settings for your server like server location, machine type, and much more.

new vm instance details

The first section is the server name field. For this tutorial, I’m naming it google-server.

Next, select the server location closest to your target audience. The server location is divided into two parts; Region and Zone, where Region is the geographical location of your server, and Zone is a deployment area of a server within a region.

I would suggest that you choose the nearest location to your users.

google cloud server location

The next section is the machine configuration, where you can choose the machine family, series, and machine type. As you can see in the image below, there are four options available on the machine family section and I’m selecting General-purpose and series E2. From the machine type, you can choose the server computing power like the number of vCPU and RAM.

google server configurations

Next, go to the Boot Disk section from where you can select an operating system you want to install on your Google cloud server. I’m going with the default that is Debian 10. If you wish to change your operating system or a different version like CentOS 7, you can do that by clicking the change button and selecting your desired OS.

server os

Now, leave all the sections and check on both Firewall rules, .i.e, allow HTTP/HTTPS traffic.

firewall config

Now your VM instance creation process is completed, you can click on Create to launch your new server. It will take a few mins to create your Google cloud server.

google cloud vm instance

Deploy the LAMP Stack

You have successfully launched a new Google cloud server, and it’s time to deploy the LAMP stack over there. For that, you need to launch your server SSH by clicking SSH.

google cloud ssh

After that, you will see the Google terminal where you will run numerous Linux commands to deploy your LAMP stack.

google server terminal

Now, all you need to do is follow my instructions and run the following commands.

sudo apt update

It will update the list of packages.

update command

sudo apt upgrade -y

It will upgrade the list of packages

upgrade command

sudo apt install apache2 -y

Install Apache2 on your Google cloud server.

install apache

Now, copy your server IP and open it in a browser to confirm the successful installation of Apache.

google cloud server ip

Please note that you haven’t installed an SSL certificate on your Google cloud server, so you need to remove the “S” from HTTPS (browser URL); else, you will see errors like “This site can’t be reached.”

You can see in the image below the Apache2 Debian Default Page successfully installed on the GC server.

apache default page

sudo apt install mariadb-server -y

To install MariaDB on your Google cloud server.

install mariadb

sudo mysql_secure_installation

To improve the security of your DB installation.

db secure installtions

After running the above command, you need to enter the root password. By default, there’s no current password, so you just need to press Enter.

db root password

If you want to set the root password for your database, press “y” and simply update it.

db password change

Similarly, you can change other security settings as well.

db security settings

After this, you need to install PHP and other modules as well.

sudo apt install  php7.3 libapache2-mod-php7.3 php7.3-mysql php7.3-common php7.3-mbstring php7.3-xmlrpc php7.3-soap php7.3-gd php7.3-xml php7.3-intl php7.3-ldap php7.3-zip php7.3-curl -y

Install PHP 7.3 and other modules.

install php modules and packages

sudo systemctl restart apache2

To restart the Apache.

restart apache

Install WordPress Application

Now, you need to install WordPress, and for that, you need to run the following commands:

sudo mysql -u root -p

To access the DB root and you will need to enter the root password.

Note: Use the password that we have previously set up during the MariaDB installation.

mysql root access


create db

Create a new database.

GRANT ALL PRIVILEGES on cw.* TO ‘farhanuser’@’localhost’ IDENTIFIED BY ‘pass123’;

Grant full control and permission to a user.

grant db permission


Changes to take effect without restarting the DB service.

flush priveleges

Now run the exit command to exit.


cd /var/www/html

Change your directory to the HTML folder.

change directory to html folder

sudo apt install wget

Install GNU Wget.

install wget

sudo wget

Download the latest WordPress version.

install wp

sudo tar xzvf latest.tar.gz

Extract the archive file.

unzip file


sudo chown -R www-data:www-data /var/www/html/wordpress/

Assign ownership.

assign ownership


sudo systemctl restart apache2

Restart your Apache2.

restart apache

Now, open the WordPress file (essentially the WordPress website) in the browser “http://yourIPaddress/wordpress.”

wordpress setup

Next, choose the language, click continue, click Let’s go!

Now, change the DBName, Username, and Password (values while creating a new DB) and click Submit to connect the database with WordPress.

wordpress and db details

Then run the installation and enter the WordPress site information you are creating and click Install WordPress.

wordpress information

After that, all you need to do is log in to your WordPress dashboard.

wp dashboard

Install WordPress on Cloudways Managed Google Cloud Hosting

If you’ve ever worked as a system administrator, you probably know how to host WordPress on Google Cloud and configure it.

But suppose you’re a web application developer, a designer, a blogger, or an agency with little to no server administration experience. In that case, you may have a hard time launching the servers, let alone managing them.

Launching a GCE server on the Cloudways Platform is a piece of cake. The process takes about seven clicks only!

The process is intuitive and designed to be simple for all users. You can have a fully functional WordPress installation of your choice hosted on a GCE cloud server in a few clicks.

What’s best is that you don’t even have to have any server knowledge to launch the GCE server on Cloudways!

Cloudways manages the server for you, but it also keeps it optimized and updated with the latest packages. Cloudways also offers 24/7 live chat support where experts can help you troubleshoot any issue you might encounter to provide you with a seamless experience.

Don’t Let Slow Load Times Hold You Back!

Try Cloudways Managed WordPress hosting on Google cloud for a hassle-free experience

1. Sign up for Cloudways

You can sign up for Cloudways and take your GCE server for a 3-day test drive. You have the chance to get acquainted with the UI of our platform and experience the power and flexibility it provides.

Just enter the required details and click the Start Free button. No credit card and no commitment required!

cloudways signup

Now verify your email to complete the signup process. After you’ve successfully signed up, click the Launch button to initiate the server launch process.

cloudways launch server

2. Select Your Application

Select the WordPress variant of your choice from the drop-down menu and name your Application, Server, and Project.

cloudways server and app details

Note: You have the choice of launching Cloudways Optimized WordPress, WordPress with WooCommerce, WordPress Multisite, or WordPress without any optimization.

3. Select Your Hosting Server

Select Google’s GCE Hosting Platform as your cloud server.

cloudways providers

4. Select Server Size

You can select the server size that best fits your requirements. Cloudways offers scalable WordPress hosting, which means you can always scale up/down your server from Server Management > Vertical Scaling.

cloudways server size

5. Select Bandwidth and Storage

On Cloudways, you can select bandwidth based on your needs to keep the costs to a minimum. You can also choose different storage sizes for database and application files.

cloudways server specs

6. Select Location

Choose the data center nearest to your target audience. For GCE, you have the option to host in multiple regions and different locations.

cloudways server location

7. Launch the Server

If you’re satisfied with the estimated cost of your selected GCE server, just press the Launch Now button.

cloudways launch now server

Now, wait for a few minutes while your GCE server is getting ready.

cloudways adding server

Once the server is ready, go to Applications from the top menu bar.

cloudways apps

Click on your WordPress application.

cloudways application

To login to your WordPress website, go to Application Management > Access Details > Admin Panel. You will see the admin credentials (username and password) for your WordPress application. Click the URL, and then copy and paste the credentials to access the WordPress admin panel.

cloudways access credentials

That’s it! You have successfully launched WordPress on Google Cloud.

Migrate WordPress Site to Google Cloud

Website migration is as easy as launching a server on Cloudways. To migrate your existing WordPress site from another provider to Cloudways, simply use our free migrator plugin, which takes care of the whole process and migrates your site in just a few clicks.

Simply download the plugin in your existing WordPress site, supply it with the required information and run the migrator.

cloudways migration plugin

The Cloudways Platform is rich in features that enable you to easily map your domain, create staging sites for testing out new features, offer free SSL via Let’s Encrypt, and lets you create team members, etc.

Supercharge Your WordPress: Host on Google Cloud!

Experience blazing-fast performance, seamless scalability, and top-notch security with Cloudways Hosting.


You have now learned how to install WordPress on Google cloud with a technical and slow method (Native GCP) and a fast and easy method (Via Cloudways).

Cloudways is designed to provide convenience to those interested in getting the full benefits of cloud hosting without wasting time on dedicated server management.

Developers love it as they can build apps on it quickly without worrying about server-side incompatibilities.

Designers like it because they can test their work with our unlimited WordPress staging environments and URLs.

And agencies adore us because they get to do what they like. Instead of handling hosting infrastructure for their clients (we ta care of that!), they can focus on their business operations. Check out how Google explains and praises the Cloudways’ features in its case study

So, start with a free trial and host your WordPress website on Google Cloud. I think you’ll love it!

Share your opinion in the comment section. COMMENT NOW

Share This Article

Sarim Javaid

Sarim Javaid is a Digital Content Producer at Cloudways. He has a habit of penning down his random thoughts and giving words and meaning to the clutter of ideas colliding inside his mind. His obsession with Google and his curious mind add to his research-based writing. Other than that, he's a music and art admirer and an overly-excited person.


Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!


Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour


  • 0


  • 0


  • 0


  • 0



For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now