
In this tutorial will show you how to setup wordpress site using Oracle Cloud Free tiers. Oracle cloud free tiers offers Always Free resources that can be used as long as you want with no time constraints, With Oracle Cloud Free Tiers you get:
- 2 Compute virtual machines with 1/8 OCPU and 1 GB memory each.
This instance that we will use in this tutorial, you can all the Oracle Cloud Free Tiers resource here
Prerequisites
- Oracle Cloud account, sign up for free trial here
- Cloudflare free account, sign up here
- A domain name of course
Creating instance in Oracle Cloud
-
Login to Oracle Cloud and go to Compute > Instances and click Create Instance button
On Create Compute Instance page select the following settingsName : wordpress
Image : Canonical Ubuntu 18.04 Minimal
Add SSH keys : Generate SSH key pair and Save Private Key
Configure boot volume : keep the default value
Click Create button to create the instance After instance has been created, noted the Public IP Address and Username, we’ll be using it for later
-
Click on Subnet name for example mine is (subnet-20201210-0845) in Primary VNIC
In Security Lists table click the default security name, for example mine is (Default Security List for vcn-20201210-0845)
Add new Ingress Rules for port 80 by clicking Add Ingress Rules buttonSOURCE TYPE : CIDR
SOURCE CIDR : 0.0.0.0/0
IP PROTOCOL : TCP
SOURCE PORT RANGE : keep blank
DESTINATION PORT RANGE : 80
DESCRIPTION : keep blank
Add new Ingress Rules for port 443 by clicking Add Ingress Rules button
SOURCE TYPE : CIDR
SOURCE CIDR : 0.0.0.0/0
IP PROTOCOL : TCP
SOURCE PORT RANGE : keep blank
DESTINATION PORT RANGE : 443
DESCRIPTION : keep blank
-
Open port 80 and 443 on Instance, SSH to your instance and type this command
sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install firewalld -y sudo firewall-cmd --zone=public --permanent --add-port=80/tcp sudo firewall-cmd --zone=public --permanent --add-port=443/tcp sudo firewall-cmd --reload
Installing wordpress on Instance
-
Download WordOps installer script and run it
wget -qO wo wops.cc && sudo bash wo
-
Enable bash_completion and Alias for WordOps
source /etc/bash_completion.d/wo_auto.rc echo -e "alias wo='sudo -E wo'" >> $HOME/.bashrc source $HOME/.bashrc
-
Pointing your domain to Oracle Cloud Instance
1. If you not use cloudflare
Go to your domain management and add A record pointing to Instance Public IP and CNAME record for www pointing to A record2. If you use cloudflare
Go to Cloudflare and click your domain and go to DNS tab and click Add record button, Add A record using the following detail:Type : A
Name : @
IPv4 address : Instance Public IP
TTL : Auto
Proxy status : DNS only
DESCRIPTION : keep blank
-
Install wordpress with with Nginx fastcgi_cache, php7.3 and Letsencrypt SSL
wget -wo site create yourdomainname.com --wpfc --php73 -le
Keep notes for WordPress admin user and WordPress admin password, it is wordpress username and password and you can change it later on wordpress admin.
WordPress successfully installed and you can check it by going to yourdomain.com -
Addtitionally you can Install Ultimate Nginx bad bots blocker with this command
wo stack install --ngxblocker
Useful links
WordOps : https://wordops.netWordOps Documentation : https://docs.wordops.net
Oracle Cloud Free Tier : https://www.oracle.com/cloud/free