You may spend money for WordPress hosting for different providers but WordPress is an open-source application. You only need a domain name and Virtual Private Server to host the application.
In this tutorial, you will learn how to host a WordPress site completely free without wasting money. When setting up a website, generally look for web-hosting providers, but Oracle Cloud is now providing a lifetime free tier with two VPS.
This is a complete tutorial for beginners. You don’t have to knowledge about coding all commands and guidelines are provided. You just have to do copy and paste the commands and follow all the steps correctly.
During this video, I will show how to host a Bitnami WordPress stack and generate an SSL certificate for free.
Create Oracle Cloud Account with Free Tier
You have to create an Oracle Cloud account first. This is an easy task, login to the Oracle site and fill the registration form using instructions. Please check the description for all the commands and guidelines. After registration, you can go to the next step.
Set up VM instance for Hosting with CentOS 7
In the Oracle dashboard, click the “create VM instance” button. Then name the instance, using any name you preferred. Under the “image and shape” click the “edit” button at the corner, then click the “change image” button to select the best OS for this server. In the given list, select CentOS as your system and change the OS version to 7. (Bitnami installer doesn’t support CentOS 8 or any newer versions, I tried Ubuntu but it was filed.)
After that, click the “select image” button to complete the selection. Under “Networking” make sure you selected “create new virtual cloud network” and “create new public subnet” options.
In the add SSH key section, select “paste public key”. To generate SSH key pairs you have to download the Putty app. I will put the link in the description, you have to download and install the software.
After installation open Putty Gen to get SSH key pair. Click the “generate” button and move your cursor in the area. Copy the public key and paste it, then click the “create” button to deploy the server. Save your private key in a safe place, it is necessary to connect the VPS. You can see the server is running now.
Let’s open some important ports in the firewall. Open your “virtual cloud network” using a new tab. Then click on subnet name. again, click on the security list name to enter the firewall section. In here, click the “add ingress rules” button to add new rules.
Add this for source to allow all IP ranges (0.0.0.0/0) and add 80 as destination port to allow HTTP traffic.
Add another ingress rule by clicking this button. Enter the same IP range (0.0.0.0/0) as above and 443 as destination port to allow HTTPS traffic.
Install Bitnami WordPress Stack on Oracle VM
You have to connect the VPS via SSH using Putty Terminal. For that open the Putty app first. Copy your public IP address and paste it as the hostname.
Under “SSH” select “Auth” then add your private key that was previously saved. You can save the session by entering any name here, then you able to connect VPS without adding credentials again. After that click the open button, the terminal will connect to the virtual machine. Type “OPC” to log in.
First, get root access using this command.
sudo -i
We have to allow added ports in the system firewall as well. Use this to allow an HTTP port
sudo firewall-cmd --permanent --zone=public --add-port=80/tcp
This for HTTPS port opens.
sudo firewall-cmd --permanent --zone=public --add-port=443/tcp
Then reload the firewall to make changes happen.
sudo firewall-cmd --reload
After that update the list of packages of CentOS 7 using this command.
sudo yum update
This process takes some time to finish. Stay relaxed during the process, I will speed up the video for you. Type “Y” to proceed. Now the process is finished.
I check the memory using this command to make sure, it has a swap file. Because WordPress required 1 GB memory. You don’t have to worry; CentOS 7 already include the swap file.
free -m
Bitnami WordPress stack image requires dependency libraries, follow these commands to install it. Please Use CentOS code ONLY.
Use this command to install Libtinfo.So.5.
- Ubuntu:
sudo apt-get update
sudo apt-get install libncurses5
- CentOS/Fedora/RHEL:
sudo yum install ncurses-compat-libs
Then install Perl. Now the server has been prepared to run the WordPress setup.
- Ubuntu
sudo apt-get install perl
- CentOS/Fedora/RHEL:
sudo yum install perl perl-Data-Dumper
You can get the latest version of Bitnami at the official site. Check the official website for more information.
Download Latest Bitnami WP Stack
Copy the Linux version link and use the wget command to download the installer.
wget https://bitnami.com/redirect/to/1448613/bitnami-wordpress-5.7.1-0-linux-x64-installer.run
Provide execute permission on the installer package using this command.
sudo chmod 755 bitnami-wordpress-5.7.1-0-linux-x64-installer.run
After that execute the installer.
./bitnami-wordpress-5.7.1-0-linux-x64-installer.run
You have to fill the simple form here, follow the instruction correctly. Type 1 to select English as the language. Then they ask about some installations type “Y” to accept both Varnish and PHP My Admin. Press enter here to proceed. Enter your real name and email address.
Carefully type and remember, a login name and login password. While typing the password, it is not visible due to security reasons, just type and just type and hit enter. Press enters to proceed.
Type “N” here, because it is difficult to set up an SMTP server here. You can set up it later if you want to know how to watch this video.
Ask for confirming installation, type “Y” to proceed. Now the process is started, it takes some time to finish, wait for it.
You will get the below screen on completing the setup successfully, enter “Y” to launch Bitnami WordPress.
Use your public IP address to access the website home page. You can see this welcome page for the first time.
Later we remove this page and the Bitnami banner. Click access WordPress link, you will redirect to the actual website. You can also admin panel using (wp-admin) at the end of the URL. Enter your credentials that you previously set up.
Here, this is the dashboard you can customize your site. Let’s look at some important changes to do.
Remove Bitnami Welcome page and Banner
First, remove the welcome page and move the homepage to the main IP address. Connect to the terminal again. Use this command to remove the welcome page.
(If you use a different version of Bitnami WordPress, you have to modify the command replacing the version number.)
/opt/wordpress-5.7.1-0/apps/wordpress/bnconfig --appurl /
Ok, let’s refresh the page and see the welcome page is removed.
It is removed successfully but you may see a Bitnami banner at the corner. Use this command to remove it as well. Refresh the page and make sure changes are made.
sudo /opt/wordpress-5.7.1-0/apps/wordpress/bnconfig --disable_banner 1
You can restart the apache server to made changes happen.
sudo /opt/wordpress-5.7.1-0/ctlscript.sh restart apache
Adding Domain for the New Site
There are different domain name providers like NameCheap, Godaddy but you have to pay for top-level domains. Check the below links to get a cheap top-level domain name for your site.
After you get the domain name, point out the domain toward the public IP address of the VPS.
Let’s see how to do that.In this video, I use Cloudflare as my domain name provider. Different providers have different interfaces but the process is the same. You have to access the DNS management section of the domain name.
First add “A” record, use @ as the name, and pate your public IP address as the target.
After that add another record, it is a “CNAME” record. Type “WWW” as name and type @ as target. It may take few minutes to change the records. You can check it is work, typing your domain.
Generate a Free SSL certificate
Now your domain is pointed to the public IP address but you can see there is a red warning at the top corner. This is due to, the domain has no SSL certificate.
SSL stands for Secure Sockets Layer, a global standard security technology that enables encrypted communication between a web browser and a web server.
Bitnami contains a tool to generate a free SSL certificate for the server. Before running the tool, please make sure your domain name is correctly pointed to the public IP of the virtual machine. You can check it using any online DNS checker tool.
After that connect to the server using the Putty app. Use this command to run the BN cert tool.
sudo /opt/wordpress-5.7.1-0/bncert-tool
It will ask some questions; you have to fill it. Type your main root domain here.
Then it asks whether you want to include the WWW form of the site. It is better to include both, type “Y” and press enter.
We won’t point out HTTP traffic to HTTPS to ensure always a secure connection.
These options you can select whatever you want. If you want to redirect non-WWW traffic to WWW form type “Y” here or not type “N”. This is the inverse of the previous question answer depends on your choice.
You have to agree with the changes you made.
Type your email address here and agree Let’s Encrypt Subscriber Agreement.
The tool automatically generates the SSL certificate for your domain. It finished the process, hit enter to continue.
Refresh the website and see the changes that have happened. Here you can see your website is secured with SSL.
Bonus Tips for Improved Performance
You can add your domain to Cloudflare that provides CDN, DNS DDoS, firewall protection, and security. Your site will be accessible fast from anywhere in the world because of the CDN feature.
A Content Delivery Network is a highly distributed platform of servers that helps minimize delays in loading web page content by reducing the physical distance between the server and the user.
It’s also provided a proxy feature that hides your WordPress server’s public IP on which you can get hacking attempts. It has a free plan with all of these features.
To improve security furthermore, install the WordFence Security plugin. It provides free services for Firewall & Malware scans.
Hope you get help with this tutorial. I invite you to join the Minex community form which shares more useful content. If you find this tutorial is helpful, like and share. Join the Form for more articles like this. Thank you.
[…] Free VPS hosting is possible. You can try using this guide. […]
[…] the terminal of your VPS or WordPress VM instances using an SSH […]
[…] 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 […]
[…] begin to display ads on your site after the code is properly inserted in the header area of your WordPress or Blogger […]
[…] you plan to run a WordPress website enable MySQL database. This is your MySQL password copy and keeps it in a safe place. After that […]
[…] you plan to host a WordPress site you have to enter the main root domain as your virtual server hostname. That part I indicate […]
[…] the WordPress site to another host, you need to fulfill few more steps. You can choose the best WordPress hosting provider to establish your […]
[…] “Add New” under “Plugins“ at the WordPress admin panel. Install this plugin called “WooCommerce PayPal Checkout Payment Gateway”. After […]
[…] activation of the FS Poster plugin, you will see a new tab in your WordPress dashboard. Click the “FS Poster” tab to add your social media account and set the activation […]
[…] see it almost 100% filled. In this time, my website shows 522 and 524 cloud flare errors. Because, WordPress and My SQL database unable to store […]
[…] Free WordPress Hosting with Free SSL on Oracle Cloud (VIDEO) […]
Very good Tutorial but please replace freenon for free low level domains with somthing which is working I would recommend duckdns.org because it is so easy and Free.
does not resolve, please fix its DNS
entries or remove it.
thes error coming
At what step this error coming up?
Thank you for responding. I Successfully connected it to Filezilla but while I am trying to rename a file I get permission denied error and also cannot upload any file or delete any FILE. Sorry to bother you if this is off topic.
You have to connect as a root user for that. Turn on the password authentication mode and try to connect as root user on filezilla. Remember you have to change the connect method in FileZilla.
Amazing post. Very informative. Just could not find anything on web on connecting it through Filezilla. it would be really helpful if you could show your community on how to do that.
Regards
You can simple use Putty file to access to Oracle cloud instance. Watch this video for more information (https://youtu.be/7bAOC-dgKzg). I use google cloud in it but you can apply it to Oracle cloud also. Please skip the Google Cloud SSH key placement part because you already place the Public SSH key on the server. so you can connect it.