As your site grows, attracts more visitors, and becomes an income source, you can no longer accept downtime or slow-downs. That’s when you know it’s time to invest in a more reliable hosting solution. For this, Google Cloud is one of the best options out there.
In this article, I’ll cover how to install WordPress on Google Cloud and what benefits you’ll reap for it. If you’re looking for a real environment experience, look no further than Cloud Academy’s Deploy WordPress using CloudFormation. This hands-on lab allows you to create your first cloud infrastructure using Amazon Cloud. This real-world lab experience will have you working directly in an Amazon Web Services (AWS) environment, and you will use the AWS Management Console to complete all the lab steps.
What is cloud hosting?
Before we start, let’s get a better understanding of what cloud hosting and Google Cloud is. Cloud hosting is, on the surface level, similar to any other hosting service – it gives you space, resource, and a control panel that allows you to control and keep a website online. The key difference lies within the infrastructure. Cloud computing uses multiple serves arranged in clusters, that allow hosting your files on multiple physical devices at once. The files can be fetched from either one of the servers that are part of the cloud.
Why should you install WordPress in a cloud environment?
Now that you know what cloud hosting can offer you – incredibly powerful alternative compared to other web hosting services – let’s look at the main benefits that you’ll get with Google Cloud:
- Google cloud caters to traffic spikes effortlessly – whenever your website experiences a massive surge of visitors, Google Cloud uses dynamic scaling for your resources, which adds additional bandwidth, or whatever other resource is required, making every single visitor experiences your website without slowdowns.
- Uptime guaranteed – since Google Cloud is essentially a network of servers, you are assured that the site will not face downtime. When you host your website, its files won’t be located on a single server. This guarantee means that if Server A is experiencing issues, then the site will be served from Server B which is functioning fine and still has all your site data ready to be brought up.
How to install WordPress on Google Cloud
First, we’ll set up a Google Cloud account, and install WordPress on the Google Cloud Platform. For this step, you don’t yet need a domain name. Additionally, if you’ll be transferring your site, the process will be slightly different. While changes are being made to your website, you should make your site private until the process is complete.
While this tutorial will focus on installing a site on Google Cloud, to transfer an existing one you’ll have to set up WordPress and import a backup of your old site’s files and database to its new home. Make sure to check if the database name, username, and password are the same after the import is complete.
1. To begin, go to cloud.google.com and create your personal account. Here, enter your address, name, and your credit card details. You can opt for the optional free trial.
2. After that, open the GCP Console. Head over to https://console.cloud.google.com/start or click the Console button on the present page.
3. Next, you need a Project. Click on the automatically generated “My First Project” tab.
In the popup box, you can adjust the information as you see fit.
4. Next, go to the Marketplace, located on the left sidebar.
5. On the next screen, there will be several apps that can be installed on the virtual machine that will be created. Here, search for WordPress using the search box, find it and select it.
Set up WordPress
Now we’re going to set up WordPress on the compute engine.
1. Hit LAUNCH ON COMPUTE ENGINE.
As seen in the screenshot below, here you can adjust the name, zone, and other details of the deployment. Be sure to select a name and enter an administrator email, and to allow both HTTP and HTTPS traffic, by ticking the boxes at the bottom. For this tutorial, we’ll leave the other fields with their default values.
After clicking the Deploy button, wait for a while to complete the installation. Once it is finished, you can access the freshly launched WordPress site by accessing its IP address. But as IP addresses don’t make for a very good first impression, next we’ll link a domain name to your Google Cloud powered WordPress site.
Add domain to Google Cloud platform
As previously mentioned, having a domain is optional, but definitely recommended. To connect a domain to the Google Cloud Platform, follow these steps:
1. Access the VPC Network on the Dashboard, and select external IP addresses.
2. The default selection under the Type column will be Ephemeral. Click on the drop-down menu and choose Static instead.
3. With the crucial part done, we’ll need to allow the Google Cloud DNS API. Click on APIs and services on the left sidebar, and select the Library. Use the search bar to find the Google Cloud DNS API and click the Enable button.
After that, come back to the Dashboard and go to the Compute Engine. There, find your WordPress instance and copy its External IP, as you’ll need it in the next step. This is the same IP address as your site address.
4. From here, go to Network services > Cloud DNS. Here, click CREATE ZONE.
Fill in the following boxes:
- Zone name – how you want to name the specific zone.
- DNS name – your registered domain name, without a prefix (E.g.: example.com)
- Description – an optional description for the zone.
Afterward, save the new zone.
4. Next, you’ll need to create two A record sets so users can access your site with and without the www prefix. To make this possible, click ADD RECORD SET and fill in these details:
- DNS name – leave this field blank.
- Resource Record Type – select A.
- TTL Unit – select minutes.
- TTL – select 5.
- IPv4 Address – enter the external IP address that you copied earlier.
After doing that, again, click on the ADD RECORD SET button. This time around, create the same record, only make sure to add “www” to the DNS name field.
5. Next, you need to update the nameservers on your domain registrar’s account. Access your account, and find the domain management area. There, replace the default nameservers with those provided by Google Cloud, which can be found by clicking Registrar Setup at the top right corner of the Cloud DNS section.
After you change the nameservers, you may need to wait for a while until the changes propagate. Once done, you’ll be able to visit your Google Cloud powered WordPress site through its new domain name.
Cloud hosting is the absolute bleeding edge in hosting solutions. It guarantees uptime, stability, speed, and much more. Best of all, it’s incredibly easy to set up and use – especially if you’re a WordPress user. In this tutorial, you learned how to Install WordPress on Google Cloud, and link a domain to it. Get ready to open your site up to a whole new world of possibilities.
All you need to do to complete the process is a Google account, and a domain name, along with access to its DNS settings. Complete the Google Cloud Project setup process, launch your WordPress site, link the domain with the help of the Google Cloud DNS API, and access your site’s WordPress dashboard.
New Content: Platforms, Programming, and DevOps – Something for Everyone
This month our team of expert certification specialists released three new or updated learning paths, 16 courses, 13 hands-on labs, and four lab challenges! New content on Cloud Academy You can always visit our Content Roadmap to see what’s just released as well as what’s coming soon....
New Content: Focus on DevOps and Programming Content this Month
This month our team of expert certification specialists released 12 new or updated learning paths, 15 courses, 25 hands-on labs, and four lab challenges! New content on Cloud Academy You can always visit our Content Roadmap to see what’s just released as well as what’s coming soon. Ja...
New Content: Get Ready for the CISM Cert Exam & Learn About Alibaba, Plus All the AWS, GCP, and Azure Courses You Know You Can Count On
This month our team of intrepid certification specialists released five learning paths, seven courses, 19 hands-on labs, and three lab challenges! One particularly interesting new learning path is Certified Information Security Manager (CISM) Foundations. After completing this learn...
Google Cloud Platform Certification: Preparation and Prerequisites
Google Cloud Platform (GCP) has evolved from being a niche player to a serious competitor to Amazon Web Services and Microsoft Azure. In 2020, research firm Gartner placed Google in the Leaders quadrant in its Magic Quadrant for Cloud Infrastructure and Platform Services for the third c...
Which Certifications Should I Get?
The old AWS slogan, “Cloud is the new normal” is indeed a reality today. Really, cloud has been the new normal for a while now and getting credentials has become an increasingly effective way to quickly showcase your abilities to recruiters and companies. With all that in mind, the s...
New Content: AWS Terraform, Java Programming Lab Challenges, Azure DP-900 & DP-300 Certification Exam Prep, Plus Plenty More Amazon, Google, Microsoft, and Big Data Courses
This month our Content Team continues building the catalog of courses for everyone learning about AWS, GCP, and Microsoft Azure. In addition, this month’s updates include several Java programming lab challenges and a couple of courses on big data. In total, we released five new learning...
How Do We Handle Google Subscription Notifications at Cloud Academy?
If you have ever used the Cloud Academy Android application, you should be aware that you have the option to subscribe to our platform by paying through Google Pay. We offered this option because most mobile users nowadays prefer paying with integrated payment systems offered by both An...
New Content: AWS Data Analytics – Specialty Certification, Azure AI-900 Certification, Plus New Learning Paths, Courses, Labs, and More
This month our Content Team released two big certification Learning Paths: the AWS Certified Data Analytics - Speciality, and the Azure AI Fundamentals AI-900. In total, we released four new Learning Paths, 16 courses, 24 assessments, and 11 labs. New content on Cloud Academy At any ...
New Content: Azure DP-100 Certification, Alibaba Cloud Certified Associate Prep, 13 Security Labs, and Much More
This past month our Content Team served up a heaping spoonful of new and updated content. Not only did our experts release the brand new Azure DP-100 Certification Learning Path, but they also created 18 new hands-on labs — and so much more! New content on Cloud Academy At any time, y...
New Content: Alibaba, Azure AZ-303 and AZ-304, Site Reliability Engineering (SRE) Foundation, Python 3 Programming, 16 Hands-on Labs, and Much More
This month our Content Team did an amazing job at publishing and updating a ton of new content. Not only did our experts release the brand new AZ-303 and AZ-304 Certification Learning Paths, but they also created 16 new hands-on labs — and so much more! New content on Cloud Academy At...
New Content: AWS, Azure, Typescript, Java, Docker, 13 New Labs, and Much More
This month, our Content Team released a whopping 13 new labs in real cloud environments! If you haven't tried out our labs, you might not understand why we think that number is so impressive. Our labs are not “simulated” experiences — they are real cloud environments using accounts on A...
New Content: AZ-500 and AZ-400 Updates, 3 Google Professional Exam Preps, Practical ML Learning Path, C# Programming, and More
This month, our Content Team released tons of new content and labs in real cloud environments. Not only that, but we introduced our very first highly interactive "Office Hours" webinar. This webinar, Acing the AWS Solutions Architect Associate Certification, started with a quick overvie...