Google provides a lot of tools and services to improve and help people around the globe. Google Cloud Platform is one of the products that is made for people, who love to explore something more other than just looking for results in Google Search. There are many ways we can make use of Google Cloud Platform – and one of them is installing WordPress on Google Cloud Platform. – The platform will work as a server, and you can install an application such as WordPress.
Google Cloud Platform is a cloud computing service that Google uses for their products. It costs $300 for the first 365 days trial. In that period, you can build your site and run it on Google’s server. After this period, you need to pay a fee based on the software and the features you have included to run your site.
Now, if you are a beginner, who doesn’t have much information or knowledge about the WordPress CMS, you can opt for this cloud server to host your website and start learning along the way. This service is free, but you need a proper Credit Card to create an account.
Install WordPress on Google Cloud Platform
Before getting started, you should know that having a domain is not mandatory. You will be assigned an IP address that would work as a WordPress site. However, you can always map a domain to your server and use the domain instead of the IP address.
To get started, head over to cloud.google.com and create an account for yourself. You need to enter your name, address and the credit card details. According to the website, Google will ask for the payment after one year instead of debiting your card right away.
Next, open the Console. You can either head over to console.cloud.google.com/start or you can click on the Console button on the current page.
Now, you need a Project. So click on Select a project button.
You will receive a popup, where you have to click on the plus (+) sign. After this, you need to enter a project name – and a project ID will be created automatically. Following that, it may take a couple of moments to set up a few things.
After you see a detailed information box on your screen, click on the Cloud Launcher option on the left-hand side.
On the next screen, you will find some apps those can be installed on the virtual machine that you have just created. As WordPress is a blog CMS, you can click on the Blog & CMS option, or you can search for WordPress using the search box. Now, try to find WordPress (Google Click to Deploy).
After clicking on this option, you will see a button LAUNCH ON COMPUTE ENGINE.
Click on it, and a couple of moments later, you should find some options like these-
Here, you can see the Deployment name, Server location or Zone, Machine type, RAM, Admin email, Disk type (SSD or Standard), Disk size, etc.
Apart from these options, you should also select the checkbox of Allow HTTP Traffic and Allow HTTPS Traffic.
After hitting the Deploy button, you need to wait for few minutes for the installation to complete. After finishing, you will see your site IP and all the other details as follows:
If you click on the IP address, it will open your newly installed WordPress site.
Add domain to Google Cloud Platform
As mentioned before, having a domain is optional. If you have a domain and you want to add that domain to your Google Cloud Platform alongside the WordPress installation, you need to follow the following steps.
On the Dashboard, click on VPC Network and select external IP addresses.
In the Type column, you will see Ephemeral. Click on the drop-down menu and select Static. Next, you need to reserve a name for it.
Having done that part, you have to enable Google Cloud DNS API. To do this, click on APIs & services and select Library. On the next page, search for Google Cloud DNS and click on the Enable button.
Now, come back to the Dashboard and go to Compute Engine > VM Instances. On this screen, you will see the External IP. Copy it to your Notepad since you need it in the next step. For your information, this is the same IP as your site address.
Next, go to Network services > Cloud DNS. On this page, click on CREATE ZONE button. Here, you have to enter these details:
- Zone name: anything that you want.
- DNS name: your domain name without WWW.
- Description: a small description to identify the zone quickly. This is optional, though.
Finally, you need to create two A records so that you can open your domain with and without www. To do this, click on ADD RECORD SET button and enter the following details-
- DNS name: let it be blank
- Resource Record Type: A
- TTL: 5
- TTL Unit: minutes
- IPv4 Address: enter your external IP address that you copied earlier.
After that, again click on the ADD RECORD SET button. But this time, enter www in the DNS Name box and use the same details you have used to create the previous A record.
After adding all the records, it should look like this-
Now, you need to add NS records to your domain registrar account. To do so, open the Domain Registrar account and enter the NS records accordingly. Do not copy from the above image since it would be different for you. These records depend on the server you choose.
After adding the NS records, it may take some time to propagate. You can check out this website to find out if your DNS propagation is done or not
- Few people claimed that this Cloud DNS page is not working in Firefox or Safari. However, if you get any such a problem, try using the Incognito mode of Google Chrome.
- If you choose Google Click to Deploy version of WordPress, you may not be able to use an FTP account. It would, therefore, be difficult to download any file from your WordPress installation directory. You should choose “WordPress Certified by Bitnami” that comes with several other management tools.
Hope you can follow these steps and install WordPress on Google Cloud Platform without any error.