WordPress Website on Oracle Cloud Free Tier

Are you planning to start a WordPress website for free, without spending a penny? Oracle Cloud's Free Tier provides an excellent solution that outperforms other cloud providers' free offerings.

Why Choose Oracle Cloud?

While there are several famous cloud providers offering Free Tier services (like AWS and Google Cloud), Oracle Cloud stands out for several reasons:

Comparison with Other Providers

  1. AWS Free Tier

    • Limited to 12 months
    • Only 1GB Network Bandwidth
    • Additional usage billed at their standard rates
  2. Google Cloud Free Tier

    • Available forever
    • Limited CPU capacity
    • Not suitable for moderate traffic
    • Low Network Bandwidth limit
  3. Oracle Cloud Free Tier

    • Forever Free Tier
    • 2 Virtual Machines (1GB memory each)
    • 10TB Network Bandwidth
    • 100GB Block Storage
    • 10GB Object Storage
    • Capable of handling moderate traffic indefinitely

How to Install WordPress on Oracle Cloud Free Tier

There are two methods to install WordPress on Oracle Cloud: The Easy Way and The Complex Way. Choose based on your needs and technical expertise.

Creating a VM Instance (Required for Both Methods)

  1. Go to your Oracle Cloud dashboard
  2. Click "Create a VM instance"
  3. Configure the instance:
    • Provide a name for your instance
    • Select Ubuntu image from available options
    • Click "Show Shape, Network and Storage options"
    • Ensure all selected items are "Always Free Eligible"
    • Leave default settings unchanged
  4. Generate SSH key pair (save it safely - required for instance access)
  5. Click create instance
  6. Once created, connect via SSH using: ssh opc@youripaddress

Method 1: The Easy Way (Using EasyEngine)

EasyEngine is a terminal-based management tool that automatically installs all necessary WordPress packages with a single command.

  1. Install EasyEngine

    wget -qO ee https://rt.cx/ee4 && sudo bash ee
    
    • Wait for the installation to complete (few minutes)
  2. Configure Domain

    • Create an A record in your Domain Registrar's DNS settings:
      Host: @
      Value: <your instance's IP address>
      TTL: auto
      
  3. Install WordPress

    sudo ee site create yourdomain.com --wp --letsencrypt
    
    • Add --letsencrypt for free SSL certificate
    • Remove it if SSL isn't needed
  4. Access WordPress

    • Visit yourdomain.com/wp-admin
    • Use the login credentials provided during installation

Note: You can create multiple WordPress websites on the same instance using the same command with different domain names.

Method 2: The Complex Way (Manual Installation)

This method provides complete control over the installation process and is recommended for learning purposes.

  1. Install LAMP Stack

    sudo apt-get update && sudo apt-get upgrade
    sudo apt-get install tasksel
    sudo tasksel install lamp-server
    
  2. Create MySQL Database and User

    sudo mysql -u root
    CREATE DATABASE exampledb_wordpress;
    CREATE USER 'example_wpuser' IDENTIFIED BY 'db_password';
    GRANT ALL PRIVILEGES ON exampledb_wordpress.* TO 'example_wpuser';
    quit
    
  3. Create WordPress Directories

    sudo mkdir -p /var/www/html/example_domain.com/public_html
    sudo mkdir /var/www/html/src/
    
  4. Download and Extract WordPress

    cd /var/www/html/src/
    sudo wget http://wordpress.org/latest.tar.gz
    sudo tar -zxvf latest.tar.gz
    sudo cp -R /var/www/html/src/wordpress/* /var/www/html/example_domain.com/public_html/
    
  5. Set Permissions

    sudo chown -R www-data:www-data /var/www/html/example_domain.com/
    
  6. Configure Apache Virtual Hosts Create a file named example_domain.conf in /etc/apache2/sites-available/ with the following content:

    <VirtualHost *:80>
        ServerName example_domain.com
        ServerAlias example_domain.com *.example_domain.com
        DocumentRoot /var/www/html/example_domain.com/public_html
        
        <Directory /var/www/html/example_domain.com/public_html>
            Require all granted
            AllowOverride all
        </Directory>
        
        RewriteEngine on
        RewriteOptions inherit
        
        RewriteRule \.(svn|git)(/)?$ - [F]
        
        RewriteCond %{HTTP_HOST} !^www.example_domain\.com [NC]
        RewriteCond %{HTTP_HOST} !^$
        RewriteRule ^/(.*) https://www.example_domain.com/$1 [L,R]
        
        <IfModule mod_headers.c>
            Header set X-XSS-Protection "1; mode=block"
            Header always append X-Frame-Options SAMEORIGIN
        </IfModule>
    </VirtualHost>
    
  7. Enable Site and Modules

    sudo a2ensite example_domain.conf
    sudo a2enmod rewrite
    sudo systemctl reload apache2
    
  8. Complete WordPress Installation

    • Visit http://yourinstanceIPaddress/example_domain.com/public_html or
    • Visit http://yourinstanceIPaddress/wp-admin
    • Follow the WordPress setup wizard

Database Reference Table

When creating multiple WordPress installations, use this reference format:

DomainDatabaseUsernamePassword
example_domain.comexampledb_wordpressexample_wpuserdb_password

Recommendation

For most users, the EasyEngine method (Method 1) is strongly recommended because:

  • It's significantly simpler to implement
  • Reduces potential configuration errors
  • Includes automatic SSL certificate setup
  • Requires minimal technical knowledge
  • Saves time and effort

The manual method is beneficial for:

  • Learning system administration
  • Understanding WordPress infrastructure
  • Custom configurations
  • Complete control over the setup process

However, be prepared for more complex troubleshooting if you choose the manual method.

Published on April 16, 202415 min read

Rishabh Singh

Technical Writer & Cloud Expert

Share this article