Hello, in this tutorial you will learn how to host a WordPress site completely free with spend cents. If you are a beginner and planned to start a website or blog with WordPress, this tutorial for you. This is a complete tutorial; you don’t have any knowledge about coding or any other technical kind of stuff. Just follow all the guidelines, all codes and instructions are provided in the video description.
I use Google Cloud Free Tier for this. It gives a lifetime Server for WordPress hosting USA or any web application.
Sign up to Google Cloud Platform
First, you have to signup for the Google Cloud Platform. You can sign in using your Google account and fill a simple form. It is an easy task; I think all of you can do it. After sign up, activate the free tier and trail, then you can go to the next step.
GCP Sign Up
Deploy the Bitnami WordPress Stack
Create a new project for your WordPress site. Name it as you like. If it is successful, you able to see the project name at the upper toolbar.
Let’s deploy the server. In the menu select “Marketplace”, you will get a huge list of applications. Under “Blog and CMS”, select “WordPress certificated by Bitnami and Automatic”. The Bitnami WordPress Stack provides a one-click install solution for WordPress and it is an open-source version.
Click the “Launch” button to start. It requires to enable some APIs, click “enable” to proceed. Here, you can customize the virtual machine.
Select “f1 micro” as your machine type and “N1” as the series, it is the only type that includes in the free tier otherwise you have to pay. You can see still, there is an estimated monthly fee. Don’t worry about it, you will never change any fee for this f1 micro machine. it is free to use 744 hours per month, which means 31 days per month.
Under zone, please select a region that is included in the free tier. These are the zones that are in the free tier. You can select boot disk size up to 30GB, further that you may get charged. I select SSD persistent disk as my boot disk type, it will speed up your WordPress site. After all setup, carefully check it again. Then click the “deploy” button. You can see, your WordPress site is deploying. Please wait for a moment until it is finished.
It is finished now. Using this IP address, you can enter into your new site. You can use this IP address to login into the dashboard. Use credentials for username and password. If you want you can change these later. Copy your site credentials and save them in a safe place. Latest see some essential steps for this.
Static the IP address
This IP address is not a static one. It changes during the restart of the sever. Let’s fix it. In the menu bar, click “external IP address” under “VPC network”. Change the IP type to “Static”. Enter any name and “reserve” the changes. Ok now it is not changed during the start, stop and restart the server.
Remove the Bitnami Banner
When you visit the site, you may see a banner at the bottom corner of the site with the Bitnami logo. Now see how to remove that banner. Go back to your “VM instances” page. Click on the “SSH” button, it will connect you with the server.
Enter this code and press enter, it will remove the banner.
sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1
Now restart the apache server using this command.
sudo /opt/bitnami/ctlscript.sh restart apache
It is done, check the site again Bitnami banner will disappear.
Get Free Domain and Point out to the Site
I will show a way to get a free domain but they are not top-level domains. If you can buy a top-level domain like .com .net .org, it helps to rank high up in the search engine results such as google, yahoo. I will provide the best domain name supplies that you can get a cheap top-level domain.
I show here only the free method. It may change the platform, for different providers but the proceeding is the same. First, you have to get a domain name, it may free or paid.
Freenom provides free domain names for your website. You can see I already have a domain name. if you struggle to get a domain name from Freenom, watch this short video.
After you got to register a domain, you have to enter the DNS management section of your domain. Here you have to add 2 DNS recodes.
The first one is “A” recode, enter your external IP address as the target and root domain (medzdoc.ml) as the name.
The second one is “CNAME” recode, type “www” as the name and enter root domain as the target.
It will take some time to update the recorders. After you can type your domain and enter into your new site.
Create Free SSL Certificate for the Domain
After you point out the domain to the site, you can see a warning sign at the top corner of the browser. It indicates that your site hasn’t an SSL certificate. An SSL certificate is a bit of code on your web server that provides security for online communications. When a web browser contacts your secured website, the SSL certificate enables an encrypted connection. It’s kind of like sealing a letter in an envelope before sending it through the mail.
Now see how to generate a free SSL certificate for your new WordPress site. Bitnami WordPress stack has included a tool to generate a Free SSL certificate. First, you have to connect the SSH terminal again. Go back to the “VM instances” page and click on the “SSH” button.
To run the tool, enter this command.
It will take you through a process, you should provide valid information. enter your main root domain here.
You should include the “WWW” version of the website as well, so type “Y” to include it.
Enable HTTP to HTTPS redirect, type “Y”.
If you want to redirect the non-WWW form to the WWW form type “Y” here.
This is the opposite of the previous one type “N” if you accept the previous one.
Confirm the changes you made by typing “Y”. Enter your email address to proceed. You have to agree to the Let’s encrypted subscriber agreement.
Now, it generates an SSL certificate automatically, wait until it is successful. Ok, now you can refresh your site and see the changes. It generates an SSL certificate; you can see this green lock icon. There is no warning sign for your site.
Add the Domain to Cloudflare CDN
This is a bonus step and it is not necessary to do. But it will increase the website speed and performance. Cloudflare is a free CDN-type product that protects against threats such as SQL injection and identity theft. Cloudflare also improves site performance and speeds up loading times by using its multiple data centers that are located around the world.
Sign-up to Cloudflare
Before this, you have to sign up for Cloudflare. I already have an account, so I log in to it. Click “add a site” and enter your root domain here. You don’t have to go to the paid plans, chose the free plan. It scans your DNS recodes and automatically gets into the system. You can check the DNS records are correct and continue. These are the recodes, we entered in the previous step.
Now you have to change the nameservers in the domain name provider and replace it with Cloudflare nameservers. This process is the same for all the domain name providers, so go to your domain name provider site. Enter into the Nameserver section and change the name servers to Cloudflare. Save the changes and continue the Cloudflare setup.
You have to complete a quick guide here. Always use HTTPS. You can use auto minify JAVA, HTML, and CSS, it will increase the loading time of your site. Now finish the setup, it will take some time to change the Nameservers to Cloudflare. Cloudflare gives protection and increases the performance of your new site.
Increase the Memory and Speed of Your Server
This is also a bonus step; in this step, we add more RAM to the server by creating Swap space. First, connect to the terminal again using “SSH”.
You can check the available memory using this code.
Create a swap file and allocate space.
sudo dd if=/dev/zero of=/mnt/swap.0 bs=3024 count=1048576
Next use this line to mount it.
sudo mkswap /mnt/swap.0
Switch to the root account to activate the swap.
Use this to activate it.
echo "/mnt/swap.0 swap swap defaults 0 0" >> /etc/fstab
Next use this command.
Check if it’s created successfully
sudo swapon -s
Check again the created main and swap size for memory. The swap file is created successfully.
Now your WordPress site is good to go. Hope you enjoy this video. I invite you to join the Minex Tuts Community form. If this video is helpful like and share. Thank You.