aka_ab
Regular Member
- Dec 1, 2017
- 262
- 92
I have come across many people asking for questions about free/cheap reliable hosting. But unfortunately the ones that are free are not reliable.
Beginners can always start with free shared hosting but if you are someone like me who likes to customize their sites to give their customers the best experience Shared hosting is not for you. I have lot of plugins installed and shared hosting cannot even manage the load even with very little traffic.
If you are a beginner who is afraid to shell out some cash to see how things work or if you are some one on a tight budget and looking to reduce costs wherever possible, then this guide is for you guys.
I decided to write a guide on how to host Wordpress websites on google cloud for free. I do want to make this guide difficult to follow by vomiting all the steps in a single guide. So, I have decided to split the guides into parts. I will keep writing successive guides whenever I find time or based on the response for this one.
First things first, sign up on Google Cloud. Add your card. They wont bill you unless you enable billing.
After you have signed up, you will have $300 worth credits for one year.
Navigate to Cloud Resource Manager by accessing this link
Now click on create project
Give a name for your project.
Now go to your cloud manager.
Now select the project you just created.
It's now time to create a VM instance.
Give it a name in the name column.
Select the zone that is nearest to target country.
You can play with machine types.
I would recommend a 1 vCPU and min of 1gb of ram for a Wordpress installation. So you select 'small' as your machine type. Again, you can set it to whatever you want. Click on customize to customize your configuration.
When you select 'micro' as your machine type, it is free forever.
Your cost would be displayed realtime on the right side. This is how much you will be charged from your $300 credit every month.
Now, you have to select a boot disk and persistence disk.
Boot disk is basically your operating system. And persistence disk is for your data. You are free to choose the size and the type of disk you require. I recommend 10GB SSD for single Wordpress installation.
Now you have to choose an operating system for your server. It can be done by clicking the ' Change' button on the right side. Again you can choose from the list or you can even deploy a custom image. I would recommend choosing either Ubuntu 16.04 LTS or Cent OS 7. I will stick to
Cent OS 7 for the rest of the this guide. If you choose Ubuntu you will have to replace yum -y install with apt-get install and certain other commands with their ubuntu equivalents.
Under the firewall option select both 'http' and 'https' traffic.
Now click on create instance.
You can now access your machine by clicking on the SSH button.
You will now have a pop window with a SSH tunnel to connect to your machine. This is the only way you can access your machine. If you want to access your machine from your local machine or any other machine you will have to enable OS Login and generate public and private SSH keys.
I am comfortable using the Google Cloud SSH console so I will not be covering how to access your virtual machine from your local machine in this guide. But, if you guys want me to cover that too, post in the thread and I will make a separate guide on it.
The first thing to do after you have enabled a SSH connection to your virtual machine is to change the root password.
To change the root password, copy and paste this code in the SSH Console.
You will be asked to enter a new password and confirm it once again. Upon completing the process successfully you will get this message.
Now if you have enabled OS Login, you have to disable root login, create a new user, grant the user root privileges to safeguard your machine from basic security threats. I am not covering it in this guide, as I said above I would make a guide separately if you guys want.
That's all for now. In the successive guides I will compare different webservers and installing your desired server on your machine with a control panel of your choice, pointing your domain to your machine, installing wordpress, hosting site, caching, etc.
I hope atleast one of you will find this guide useful.
Beginners can always start with free shared hosting but if you are someone like me who likes to customize their sites to give their customers the best experience Shared hosting is not for you. I have lot of plugins installed and shared hosting cannot even manage the load even with very little traffic.
If you are a beginner who is afraid to shell out some cash to see how things work or if you are some one on a tight budget and looking to reduce costs wherever possible, then this guide is for you guys.
I decided to write a guide on how to host Wordpress websites on google cloud for free. I do want to make this guide difficult to follow by vomiting all the steps in a single guide. So, I have decided to split the guides into parts. I will keep writing successive guides whenever I find time or based on the response for this one.
First things first, sign up on Google Cloud. Add your card. They wont bill you unless you enable billing.
Code:
https://cloud.google.com/ (non-affiliate link)
After you have signed up, you will have $300 worth credits for one year.
Navigate to Cloud Resource Manager by accessing this link
Code:
https://console.cloud.google.com/cloud-resource-manager
Before we begin there is a one click wordpress install option using the google cloud launcher, but it will cost you $$$. But if you are ok with some pain in the ass initially to save $$$ you can continue with this guide.
Now click on create project
Code:
https://imgur.com/a/FSmWE
Give a name for your project.
Now go to your cloud manager.
Code:
https://console.cloud.google.com/
Now select the project you just created.
It's now time to create a VM instance.
Give it a name in the name column.
Select the zone that is nearest to target country.
You can play with machine types.
I would recommend a 1 vCPU and min of 1gb of ram for a Wordpress installation. So you select 'small' as your machine type. Again, you can set it to whatever you want. Click on customize to customize your configuration.
When you select 'micro' as your machine type, it is free forever.
Your cost would be displayed realtime on the right side. This is how much you will be charged from your $300 credit every month.
Code:
https://imgur.com/a/QCUld
Now, you have to select a boot disk and persistence disk.
Boot disk is basically your operating system. And persistence disk is for your data. You are free to choose the size and the type of disk you require. I recommend 10GB SSD for single Wordpress installation.
Now you have to choose an operating system for your server. It can be done by clicking the ' Change' button on the right side. Again you can choose from the list or you can even deploy a custom image. I would recommend choosing either Ubuntu 16.04 LTS or Cent OS 7. I will stick to
Cent OS 7 for the rest of the this guide. If you choose Ubuntu you will have to replace yum -y install with apt-get install and certain other commands with their ubuntu equivalents.
Under the firewall option select both 'http' and 'https' traffic.
Code:
https://imgur.com/a/jUbd5
Now click on create instance.
You can now access your machine by clicking on the SSH button.
Code:
https://imgur.com/a/tBcoC
You will now have a pop window with a SSH tunnel to connect to your machine. This is the only way you can access your machine. If you want to access your machine from your local machine or any other machine you will have to enable OS Login and generate public and private SSH keys.
I am comfortable using the Google Cloud SSH console so I will not be covering how to access your virtual machine from your local machine in this guide. But, if you guys want me to cover that too, post in the thread and I will make a separate guide on it.
The first thing to do after you have enabled a SSH connection to your virtual machine is to change the root password.
To change the root password, copy and paste this code in the SSH Console.
Code:
sudo passwd
You will be asked to enter a new password and confirm it once again. Upon completing the process successfully you will get this message.
Code:
passwd: all authentication tokens updated successfully.
Now if you have enabled OS Login, you have to disable root login, create a new user, grant the user root privileges to safeguard your machine from basic security threats. I am not covering it in this guide, as I said above I would make a guide separately if you guys want.
That's all for now. In the successive guides I will compare different webservers and installing your desired server on your machine with a control panel of your choice, pointing your domain to your machine, installing wordpress, hosting site, caching, etc.
I hope atleast one of you will find this guide useful.