WordPress website on Oracle Cloud Free Tier

Are you planning to start a WordPress website for Free, without spending a penny? If so, then you should take a look at Oracle.

Why Choose Oracle Cloud?

There are many famous cloud providers that offer Free Tier (like AWS, G Cloud, etc.), then why should you choose Oracle Cloud?

wordpress on oracle cloud

AWS & Google Cloud free Tier of their services, but they limits you on Network Bandwith.

Aws provides you free tier for 12 months with only 1GB Network Bandwidth, anything past 1GB will be billed as per their rates.

Google Cloud allows you to use Free tier forever, but the CPU provided in Free tier is not large enough to handle moderate traffic, and it also has low Network Bandwidth limit.

But Oracle Cloud on the other hand, offers you Forever Free Tier with 2 VMs (1GB memory each) 10TB Network Bandwidth + 100GB Block Storage + 10Gb Object Storage. This configuration is more than enough to run a website with moderate traffic for Free Forever.

How to install WordPress on Oracle Cloud Free Tier?

Setting up WordPress on self-managed VPS can be quite complex. So In this article, I’ll show you how to install and host WordPress on Oracle Cloud Forever Free tier.

Creating a VM:

First, create a VM by going to your Oracle Cloud dashboard and clicking “Create a VM instance“.

On the Next page, Give a name to your instance, Select Ubuntu image from the list of available images. Click on show Shape, Network and Storage options, and make sure you have selected “Always Free Eligible” items.

Leave all the settings to default, scroll down and Generate a “SSH key pair”. This SSH key will be used to connect to your instance, so keep it safe.

Finally, click on create instance.

Once the instance has been created, open Terminal or command line on your PC and type ssh opc@youripaddress. Replace youripaddress with your Oracle Instance’s ip address.

Next part is Installing WordPress on your instance.

There are 2 ways to install WordPress on your instance: The Easy way & The Complex way. If you’re just looking to get your WordPress up and running as soon as possible, go with the easy way, If you are doing this to learn something new then go with the complex/manual way.

First: The Easy way

Installing WordPress via EasyEngine:

In this method we’ll Install WordPress using EasyEngine, EasyEngine is a terminal-based management tool that installs all necessary packages required by WordPress automatically in just a single command.

To install EasyEngine, SSH into your instance and enter the following command:

wget -qO ee && sudo bash ee

It’ll take few minutes to complete the installation process.

Next, you need to point your domain to Oracle Cloud’s instance, you can do that by creating an A record in your Domain Registrar’s DNS setting.

@<your instance’s IP address here>auto

Once your Domain is pointed to your instance, enter the below command to install WordPress along with Free Letsencrypt SSL.

sudo ee site create --wp --letsencrypt

If you don’t want Letsencrypt SSL, then remove the –letsencrypt part.

Now, it will again take few minutes to install all necessary packages, and present you with your WP Login credentials.

And, That’s it. Your WordPress website is now created, you can visit to log into your dashboard.

You can use the command sudo ee site create --wp --letsencrypt multiple times to create multiple WordPress websites on the same instance.

Second: The Complex way

If you want to do all the things manually (like installing Php, MySQL, setting up users), then follow this method.

After creating your instance, the next step is to install LAMP stack on it.

SSH into your instance and Enter the below 2 commands (one by one) in the terminal window – to install tasksel: (Press “Enter” after each command)

sudo apt-get update && sudo apt-get upgrade

sudo apt-get install tasksel

Use tasksel to install the LAMP server:

sudo tasksel install lamp-server

This will install Apache, MySQL, & Php on your instance (the 3 things that are required by WordPress to run).

install lamp server on ubuntu command line

Next, you need to create a database and users for WordPress.

This is the table that we need to create:


If you want to create multiple WordPress websites, then you need to create the above table for each instance.

To create the table, log into MySQL as root user buy entering the following command:

sudo mysql -u root

Create the WordPress database:

CREATE DATABASE exampledb_wordpress;

The exampledb_wordpress is the name of your database, you can change it to whatever you like.

Create Database user and password:

CREATE USER 'example_wpuser' IDENTIFIED BY 'db_password';

Change example_wpuser & db_password with your desired username and password. (Remember, that these are the username & password of your Database, not WordPress)

Now you need to grant user privileges to the newly created user and exit MySQL.

GRANT ALL PRIVILEGES ON exampledb_wordpress.* TO 'example_wpuser';


Create directories to hold WordPress files.

WordPress source files directory:

sudo mkdir -p /var/www/htdocs/

WordPress tarball files directory:

sudo mkdir /var/www/htdocs/src/

Download and store WordPress file to the above src directory:

cd /var/www/htdocs/src/ 

sudo wget

Extract the downloaded Tarball file:

sudo tar -zxvf latest.tar.gz

Copy WordPress files to publc_html:

sudo cp -R /var/www/htdocs/src/wordpress/* /var/www/htdocs/

Give Apache root permissions:

sudo chown -R www-data:www-data /var/www/htdocs/

Configure Apache Virtual Hosts:

This method is required in case you want to host multiple WordPress websites in future. So that each domain pointing to your instance serves content from its own specified folder.

Create a file called example_domain.conf paste the below text in it:

<VirtualHost *:80>
    # The primary domain for this host
    # Optionally have other subdomains also managed by this Virtual Host
    ServerAlias *
    DocumentRoot /var/www/htdocs/
    <Directory /var/www/htdocs/>
        Require all granted
        # Allow local .htaccess to override Apache configuration settings
        AllowOverride all
    # Enable RewriteEngine
    RewriteEngine on
    RewriteOptions inherit

    # Block .svn, .git
    RewriteRule \.(svn|git)(/)?$ - [F]

    # Catchall redirect to
    RewriteCond %{HTTP_HOST}   !^www.example_domain\.com [NC]
    RewriteCond %{HTTP_HOST}   !^$
    RewriteRule ^/(.*)$1 [L,R]

    # Recommended: XSS protection
    <IfModule mod_headers.c>
        Header set X-XSS-Protection "1; mode=block"
        Header always append X-Frame-Options SAMEORIGIN


and upload it to /etc/apache2/sites-available/ directory. You can do this by using Filezilla.

Replace all appearance of with your domain.

Create the symlink:

sudo a2ensite example_domain.conf

Now, check if the rewrite module is enabled by using the below command:

sudo apache2ctl -M

If you don’t see rewrite module in the list, enable it by the below command (If it is already present, skip this step)

sudo a2enmod rewrite

Finally Reload Apache:

sudo systemctl reload apache2

Complete WordPress Installation

If your domain is already pointed to your instance, then you can just type your domain in the browser to finish WordPress installation. Otherwise, visit: http://yourinstanceIPaddress/ or http://yourinstanceIPaddress/wp-admin in your browser.

You should now see the WordPress setup wizard.

wordpress setup wizard

So this was the manual way of installing WordPress on Oracle Cloud, I’ll recommend that you use the First method because this method is really complex and you can run into many issues.


  1. Good job Sir
    I took The Easy way and everything is fine.
    but I have a problem when I use some plugins which make tables by importing data from excel or csv file. The Arabic characters show as question marks .
    and I can’t figure how to fix this. could you help me fixing this issue?
    many thanks.


Leave a Comment