Free Tier: Install WordPress on an Ubuntu Instance

In this tutorial, use an Oracle Cloud Infrastructure Free Tier account to set up an Ubuntu instance. Next, install an Apache web server, PHP 8, MySQL, and finally WordPress. After installation, access your new WordPress installation from the internet. This tutorial covers all the steps necessary to set up a virtual network, a compute instance, and connect the host to the internet.

Key tasks include how to:

  • Set up a compartment for your development work.
  • Install an Ubuntu Linux instance and connect it to a Virtual Cloud Network (VCN).
    • Set up an Oracle Cloud Infrastructure virtual cloud network and related network services required for a host to connect to the internet.
    • Set up ssh encryption keys to access the Ubuntu Linux Server.
  • Configure ingress rules for a VCN.
  • Configure Apache, PHP 8, MySQL, and WordPress on the VM.
  • Connect to the instance from the internet.

Here is a simplified diagram of the setup for the Linux VM.

A diagram of the components needed to run a Apache webserver on Oracle Cloud Infrastructure

For additional information, see:

Before You Begin

To successfully complete this tutorial, you must have the following:

Requirements

1. Set up a Compartment for Development

Configure a compartment for your development.

2. Install an Ubuntu Linux Instance

Use the Create a VM Instance workflow to create a new compute instance.

The workflow does several things when installing the instance:

  • Creates and installs a compute instance running Ubuntu Linux.
  • Creates a VCN with the required subnet and components needed to connect the Ubuntu Linux instance to the internet.
  • Creates an ssh key pair you use to connect to the instance.

3. Enable Internet Access

The Create a VM Instance workflow automatically creates a VCN for your VM. You add an ingress rule to the subnet to allow internet connections on port 80.

4. Install and Configure Apache, PHP 8, MySQL, and WordPress

Next install and configure Apache web server and PHP to run on the Ubuntu Linux instance.

What's Next

You have successfully installed and deployed an Apache web server on Oracle Cloud Infrastructure using a Linux instance.

To explore more information about development with Oracle products, check out these sites: