WordPress Migration to OCI: Opening Ports

When you provision an instance (host) on OCI, a public IP address is assigned.

I have already covered how to open ports on OCI in my previous post.


Next time, I will cover how to install the necessary software on the newly provisioned instance.

Zoom Chooses Oracle Cloud Infrastructure

In the coronavirus pandemic situation, the demand for getting online has surged. Zoom has been an essential tool to communicate with my colleagues.

Just recently Zoom chose Oracle Cloud Infrastructure as its infrastructure. This is a very interesting news. Not AWS, not Azure, not Google Cloud but Oracle Cloud Infrastructure.

It’s amazing to learn that 7 petabytes of data goes through Oracle Cloud Infrastructure daily according to this article.

Now I should go back to migrating my WordPress site to OCI. 🙂

How Many TCP Connections?

Your host might be experiencing a latency issue and the network looks OK. Where is the bottleneck? If many TCP connections are made to a host somehow, that can cause latency issue. Let’s count how many TCP connections are made on the host.

$ wc -l /proc/net/tcp

The output looks like the following.

256 /proc/net/tcp

If the number is ridiculously high, like hundreds of thousands of connections, there may be an issue with the way code is written. For example, if many database connections are open to the database, this kind of issue can happen.

WordPress Migration to OCI: Create a Host and Configure

We will need an instance to host the WordPress blog. Here are the steps.

Create a Host (Instance)

Login to Oracle Cloud Infrastructure. You already should have an account with OCI.

Click the menu at the left corner and Compute -> Instances.

Click Create Instance button.

Do the following in the next screen.

  1. Give the instance a name.
  2. Click Change Image button and select CentOS 7.6.
  3. Select AD3 in Availability Domain.
  4. Click Change Shape button and select VM Standard E2.1 Micro. This is a free tier available in OCI.

Paste the content of your public key located at ~/.ssh/id_rsa.pub to the SSH Keys textbox.

Finally click Create button at the bottom.

After a while, the instance is created and available for you to SSH into it. Let’s SSH!

Update the Base CentOS 7

Check the assigned public IP address for the host in the detail page of the instance you just provisioned.

Open Terminal and enter the following command.

$ ssh opc@[your public IP address]

And then install epel-release repository.

$ sudo yum install epel-release

Now update the packages.

$ sudo yum upgrade


We went over how to provision an instance (host) on OCI and SSH into it in the free tier. We will cover how to add things to the provisioned host next time.

WordPress Migration to OCI: Backing Up Data

There are many steps in migrating WordPress blog to another host. In this first attempt, I am going to cover backing up data.

Backup Database

In many web site hosts, phpMyAdmin is available to manage database such as MySQL or Maria DB.

Open the phpMyAdmin UI and click on the WordPress database, and then click Export.

Click Custom – display all possible options and Add CREATE DATABASE /USE statement. And then click Go button.

The browser automatically downloads the SQL file to your local machine. Keep the file for later use.

Backup WordPress Files

Use FTP or (preferably) SFTP to download all the WordPress files to. your local machine so that you can upload them to your new host.

I recommend that you use software like FileZilla. Your website host might have a way for you to compress the files and let you download them. It really doesn’t matter which method you use to get all the WordPress files.

Keep the files for later use.


The next blog article will be about provisioning OCI host.

Planning of WordPress Migration to OCI’s Free Tier

At the time of writing this blog, I am planning to migrate this blog from ipage.com to OCI’s free tier. Here is the list of what I’m planning.

  1. Backing up database.
  2. Backing up WordPress files.
  3. Install CentOS 7 on OCI and update.
  4. Configure CentOS 7 to accept 80 and 443 inbound traffic.
  5. Install Maria DB on it.
  6. Install NGINX.
  7. Install myPHPAdmin and get it to work with Maria DB.
  8. Restore data to the Maria DB database.
  9. Create user for WordPress in Maria DB and give it privileges.
  10. Upload the backed up WordPress files.
  11. Configure wp-config.php.
  12. Configure SSL in NGINX.
  13. Configure NGINX to redirect HTTP (port 80) to HTTPS (port 443).
  14. Change DNS configuration in ipage.com to route the traffic to the OCI instance.

I decided to go for NGINX because I feel it is a superior web service/reverse proxy. I will write more about the migration as I go through every single step.