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.

How to Host WordPress on Google Cloud Hosting

November 29, 2021

12 Min Read
google hosting wordpress

In this article, I will show you how to host a WordPress site on a Google VM instance. After that, I’ll go into 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 WordPress hosting, why do people prefer a managed WordPress hosting like Cloudways over a native Google cloud web hosting?

Benefits of Hosting WordPress on Google Cloud

Google Cloud is one of the most sophisticated, reliable, and fastest cloud infrastructure. Mammoth companies such as HSBC, Twitter, PayPal, and Bloomberg use GCE for their hosting requirements.

Here are some of the reasons why Google WordPress hosting is a great idea for your websites:

Uptime

Google Cloud Engine is available for more than 99.9% of the time. Businesses such as big ecommerce stores, trading sites, and news sites rely heavily on optimal server uptimes because even a slight interruption in the service can cause serious monetary damage.

Speed

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

Reliability

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? You don’t, of course.

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 to ensure better performance than its competitors. They do this by automating configuration changes, use an extra layer of verification to discover any potential problems, and closely monitor the impact on the infrastructure due to modifications.

Scalability

GCE servers are highly scalable and can handle unexpected traffic spikes with ease, and lets 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 softwares that allow users to monitor the performance of their servers.

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.

For a WordPress user, using GCE is not easy. There is a lot to do even before installing WordPress on it. You have to purchase an instance on Google hosting, 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 a 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, and for this tutorial and 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 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, and 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 DATABASE cw;

Create a new database.

create db

 

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

Grant full control and permission to a user.

grant db permission

 

FLUSH PRIVILEGES;

Changes to take effect without restarting the DB service.

flush priveleges

 

Now run the exit command to exit.

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 https://wordpress.org/latest.tar.gz

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.

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. This means

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. In case you are migrating 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, offers free SSL via Let’s Encrypt, and lets you create team members, etc.

Conclusion

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 take 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

Customer Review at

“Beautifully optimized hosting for WordPress and Magento”

Arda Burak [Agency Owner]

Farhan Ayub

Farhan is a community manager at Cloudways. He loves to work with WordPress and has a passion for web development. Mostly, he spends his time interacting with the people in the WordPress community. Apart from his work life, Farhan spends his time gaming and playing sports. Feel free to contact him at [email protected]

×

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!

x

For 4 Months

Promo: BFCM2021
  • 28

days

  • 28

Hours

  • 28

Mins

  • 28

Secs