How to Install WordPress on Digitalocean (Visual Guide)

Blog WordPress
Author
Zee Ahmed
President/CEO
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Most guides about installing WordPress on DigitalOcean create issues in the long term, especially when you’re not a great developer.

Why?

  • Software applications get outdated.
  • Maintenance becomes a problem.
  • Security risks.
  • cPanel gets expensive.

In this guide, I’ll tell you the secrets of how to avoid such issues by choosing aaPanel, a free and open-source alternative to cPanel.

What is aaPanel, and Why Is it Better?

The answer is simple. It’s open-source and free like WordPress.

It doesn’t limit your server, unlike other panels like Cyberpanel, allows hosting of a maximum of two websites on its free plan.

Moreover, aaPanel enables you to:

  • Install WordPress, Joomla, and Drupal with the one-click software package.
  • Free backup creations on Google Drive with hourly, daily, weekly, and monthly frequency.
  • Great security built-in.
  • Low resources hungry.
  • Low maintenance.
  • Great user interface.
  • Powerful online editor.

And much more.

Do you want to hear the best part?

On a $15 Digital Ocean plan with 2CPU, 2GB RAM, and 60GB space, I have hosted one of my clients 13 websites: 12 WordPress and one static. And it runs perfectly.

AaPanel

Only 486MB RAM is being utilized, and the server is running correctly without any issue.

WordPress Websites

Are you excited to get started?

Installing WordPress on DigitalOcean (Step by Step)

Installing WordPress on DigitalOcean is the best thing you can do since it costs a lot less money to run.

Step 1 – Sign in to Digital Ocean

We’re not here to promote Digital Ocean with an affiliate link. Go to the official website and sign in.

Digital Ocean Homepage

Step 2 – Create a Droplet

The second step is to create a droplet. A droplet is a Linux-based virtual machine, a new server — think of renting a server or buying a plan from a hosting website.

It’s simple to build a droplet. Navigate your mouse cursor to the Create > and click Droplets.

Create A Droplet In DigitalOcean

Step 3 – Choose an Image

The next step is to choose an image recommended by the developer.  aaPanel recommends CentOS, but Red Hat has killed CentOS after IBM purchased Red Hat for 34 billion dollars.

Learn more about the story later on in this article.

So, choose Ubuntu 20.04 LTS that promises to offer maintenance updates for five years, until April 2025, unlike CentOS 8 until December 2021.

Choose An Image In Ubuntu

Step 4 – Choose a plan.

Now you need to choose a plan.

It depends on your website that you’re going to host since each website will have its theme, plugins, and widgets.

Generally speaking, you can easily host 5 WordPress websites on the $5 droplet on DigitalOcean if the websites get regular traffic.

For the sake of this tutorial, I’m choosing the $5 plan.

DigitalOcean Plan

Note: If you’re still unsure how many servers your websites can handle on your website, then the best way is to create a backup of your website and restore it on the server. Then conduct testing using stress tools.

Step 6 – Choosing a Data Center

It’s recommended to choose the data center that is closest to your users. For example, if most of your users come from New York, you should host your website on a server hosted in New York.

Data Center In DigitalOcean

Please try to find out where your users come from.  Use Google Analytics’s data about your users’ location and use Google Maps to find the distance between your city and the Digital Ocean data center.

Distance Between New York And DC

How can you find it in Google Analytics? Just type the term country in the search bar, and it shows you instantly in the Analytics Intelligence window.

Google Analytics

Step 5 – Authentication

It could be the most complicated step for beginners. First, enable Monitoring (optional) that alerts you if something goes wrong.

Secondly, select the SSH keys. If you want to avoid this step, you can set a password and move on to the next step.

 If you want to enhance your server’s security, utilizing the SSH keys can make your server security better.

SSH Keys In DigitalOcean

To generate an SSH key, download the simple software, PuTTY — for Windows users.

Download The Putty

Download it. Install it. Open it. Keep in mind open PuTTYgen, not PuTTY.

Puttygen

It will show you a simple interface.

PuTTY Key Generator

When you hit the button Generate, you should move your mouse courses to generate the key faster. Once done, save both public and private keys on your local machine.

Save Public And Private Putty Key

Both saved keys will appear like the screenshot below:

Private Ppk

Now go back to Digital Ocean, and click New SSH Key.

New SSH Key

Copy the whole code from PuTTY Key Generator and paste it into the public SSH key box. Now click Add SSH Key.

PuTTY Key Generator And Paste Into SSH Key To Digital Ocean

Step 6 – Add Backups

In this step, you can choose a hostname and the VPS name.  You can also put a tag. Both are optional steps.

You can also create a backup of your VPS taken once a week and retained for a month with Digital Ocean, but it takes extra charges, 20% of your total plan price.

If you lack a budget, you can leave taking backups since we can use the Google Drive Backup app later on in this article for free.

Create Droplet

Step 7 – Installing aaPanel

To install aaPanel, you need a little bit of patience.

Wait Loading

After a few seconds, you’ll see the droplet is ready.

New Droplet Is Ready

Now run PuTTY if you use Windows. If you’re a Mac or a Linux user, you can use your default terminal.

Run PuTTY

So copy the ipv4 and paste it into the HostName of PuTTY.

Put The Ipv4 Into PuTTY

We need to put the SSH key we generated.

Note: If you didn’t generate an SSH key, you could connect directly.

Go to Auth and browser the private key. Click Open.

SSH Key

It shows an alert message.

Yes

Now type root, it will successfully enter the terminal like this:

Type Root

Now copy the line as shown below:

AaPanel Ubunto

Now paste the Ubuntu line into the Putty.

AaPanel Installation

It asks a few questions.

Press y for the question “Do you want to install aaPanel to the /www directory now?”. Press again y.

After type yes to the question, “Do you need to enable the panel SSL?”

Aapanel Install Process

It starts downloading the panel. It might take from 5 minutes to 10 minutes. Have patience.

AaPanel Username And Password

Once it’s installed, you’ll get the aaPanel Internet Address, username, and password. Copy them and paste them into your notepad.

Save It On Notepad

Enter the internet address into the browser, click Advanced on Chrome, and click Proceed to IP (unsafe). It happened as we enabled SSL for our server.

Proceed SSL

Put the username and password that aaPanel provided in the terminal.

Username And Password

Step 8 – Installing Web Server and Apps

As soon as you type the username and password, you’re prompted to install the recommended software packages.

Installation AaPanel Completed

I don’t install Apache and Nginx; instead, I prefer to use Litespeed for numerous reasons, but the main reason is that it’s faster and better than all web servers. It handles requests and users better than Apache and Nginx.

Litespeed Is Faster

That’s why I install all the software packages except the Nginx web server. I’ll install the webserver OpenLiteSpeed later on.

You can select the following software packages:

  • MySQL 5.7
  • Pure-Ftpd 1.0.047
  • PHP 7.4
  • PHPMyAdmin 5.0

One Click Install

You can install any software packages; you can trust me and follow me along. Once decided, click One-click. You’ll need to wait for a few minutes.

Insallation The Services

When all the software packages are installed, you’ll see the message.

Currently No Task

Now it’s time to install the OpenLiteSpeed web server. In order to install it, go to the App Store, search OpenLiteSpeed and install it.

Install The Openlitespeed

I recommend installing all these software packages:

  • MySQL
  • Pure-Ftp
  • PHP
  • PHPMyAdmin
  • Memcached
  • OneClick Deployment
  • Google Drive

Apps Installed

Step 9 – Installing WordPress

Let’s come to the tutorial’s most exciting part: installing WordPress on a super-fast web server.

In order to install WordPress, go to the App Store, navigate to OneClick Deployment and click Settings. Find WordPress and press One-click.

Install WordPress One Click Deployement

You need to type the domain on which you want to install WordPress. I’ll use the domain cpcexam.xyz as an instance.

Don’t forget to copy the Database username and password into your notepad.

AaPanel One Click

Once done, click Submit.

Success Message

It’s not done yet 😀 You’ll get an error message if you try to access your website. Make sure you have put the DigitalOcean nameservers into your domain registrar.

Youll Get An Error

I’ll recommend installing Cloudflare since it protects your server from potential hackers by hiding your server IP and DDOS attacks.

Let’s add a website to Cloudflare.

Cloudflare SIgn In

Once you’ve created your account, click Add a site.

Add A New Site On Cloudflare

Enter your website to add to the Cloudflare network.

Enter Your Site Name

Select the free plan.

Select The Free Plan Of Cloudflare

Click Continue.

Continue

Copy the Cloudflare’s nameservers.

Name Server Changes

And paste into your domain registrar.

Name Server Changes In Namecheap

Now go back to Cloudflare, and click Done, check nameservers.

Done Check Server In Cloudflare

And click Finish.

Summery Of The Guide

It takes a few minutes to complete the DNS propagation. Sometimes, it might take an hour too.

Refresh The Cloudflare

Once done, go to the DNS section and export all your records in case something goes wrong.

Export The DNS Records

I’m going to delete all the DNS records.

Delete DNS Records

As I have added the website to Cloudflare, I need to put the Digital Ocean’s name servers.

Add The NS Server To DigitalOcean

You have to add three name servers like these:

Name Server

Now we need to add the A Record.

Add A Record Of DIgital Ocean To Cloudflare

In a nutshell, you have to add four records: 3 nameservers and 1 A Record.

One A Record And Three NS On Cloudflare For DigitalOcean

It’s time to install the SSL. Go back to aaPanel > Website and click the website where you want to install SSL. Without SSL, WordPress will not work. You can install an SSL, by the way.

SSL Install

We need to put the email and API into the SSL section of aaPanel.

Go to SSL > Let’s Encrypt > DNS Verification > Cloudflare API and enter the email and the Global API Key.

To get the Global API, click My Profile > API Tokens > View of Global API Key.

Global API Key Of Cloudflare

As you can see how I set up the API.

API Done

The free SSL is being installed, and it’s automatically renewed for a lifetime.

Installing SSL

Sometimes your website might give you an error like this:

Another Error

It happens when you don’t put the SSL to full.

SSL FUll

Refresh your website; now you can install WordPress. Put the Database name, Username, and Password that we copied during the One-Click Deployment WordPress installation.

Moreover, put a strong username and password to install WordPress. Congratulations! WordPress has been installed successfully.

Install WordPress Easily

Step 11 – Google Drive Daily Backups

You can enjoy the premium features of aaPanel for free. You can create regular backups of your website on Google Drive without taking any space on your server storage drive.

It’s useful to have regular backups if your server gets hacked or your website shows unusual behavior.

Make sure you have installed Google Drive on your server. Go to the App Store and install Google Drive.

Google Drive Backup

Once installed and authenticated with your Google Drive, go to Cron and select Backup site from Type of Task and select any website from the list or create all websites’ backups.

Backup All Sites

Don’t forget to create backups of your database; otherwise, your backups are useless.

Database Backups As Well

These backups are stored on your Google Drive in your bt_backup folder.

Daily Backups

Don’t Install WordPress on CentOS 8

The open-source community got furious when RedHat killed CentOS after IBN purchased RedHat in 2019 for 34 billion dollars.

Redhat Killed CENTOS

It means the security upgrades for CentOS 8 will end in 2021 rather than 2029, as users anticipated.

So it’s recommended not to install WordPress on CentOS 8. Of course, you can install WordPress on CentOS 7, whose security upgrades end in 2024.

CENTOS End Of Lifetime

But the recent move, the date might be changed at no prior notice, as is the case with CentOS 8.

Instead of choosing CentOS 8 or 7, you go after Ubunto.

Final Thoughts

DigitalOcean has made WordPress installing easy and straightforward. It offers excellent performance, flexibility, and control, and the tools that make your life easier.

aaPanel, a great cPanel great alternative, has excellent features that enhance your server security and make maintenance simple and affordable. You can host plenty of websites that otherwise might cost hundreds of dollars on other hosting companies.

If you didn’t get any step, don’t hesitate to comment below. I promise you’ll get a reply within 24 hours. We love our clients and website visitors.