GCP Free Tier
Hosting a Dynamic Website
This tutorial describes how t configure a Compute engine to host a dynamic website. Dynamic web pages contain server-side scripts like PHP.
In this tutorial you will:
- Point your domain to WordPress Instance using the cloud DNS service.
- Test the Website.
This tutorial uses the following billable component of Cloud Platform:
- Compute Engine
- Cloud DNS
GCP Free Tier
The above Listed components are available for free Tier.
Before you begin
- Select and create a google cloud platform project. Go To The Manage Resource Page Make sure that billing is enabled for your Google Cloud Platform project.
- Make Sure that billing is enabled for your Google Cloud Platform project. Learn How To Enable Billing
- Have a domain that you own or manage. If you don’t have an existing domain, there are many websites through which you register a new domain, such as Godaddy, Namecheap, etc.
- Verify that you own the domain you are associating to Cloud DNS.
Creating a CNAME record
A CNAME record is a type of DNS record. It directs traffic that request a URL from your domain to the resource you want to serve, in this case, domain name. For example www.jntukmaterials.com , the CNAME record might contain the following information.
To connect a domain to Compute Engine:
Create a CNAME record that points to jntukmaterials.com In this case your Domain name.
Your domain registration service should have a way for you to administrate your domain , including adding CNAME record and other record types. .In this case we have bought a domain name in Godaddy and using Google Cloud Platform as Hosting provider.
Creating a WordPress Instance in the Marketplace
To create a WordPress Instance:
Go to marketplace
Search WordPress , Click on wordpress certified by bitnami
Click On WordPress Certified by Bitnami
Launch On Compute Engine
Leave all the details as it is or change according to your requirements
Finally Deploy the Instance
Now you have deployed a WordPress Instance
Managing the WordPress instance
- Now make the external ip as static by going to External ip Addresses.
2. Go to the Cloud DNS by searching in the search bar
3. Create a DNS Zone by providing your domain name in the zone name and then click create.
4. After that, you will get some records like this and you will need to add the A record by providing the external IP of your WordPress instance.
5. Create a CNAME record by proving the domain name.
Testing the website
Verify the website by typing your domain name in a browser.
As I pointed the domain name to my WordPress instance. That Works..
Thanks for reading……