Most guides about installing WordPress on DigitalOcean create issues in the long term, especially when you’re not a great developer.
- 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.
Only 486MB RAM is being utilized, and the server is running correctly without any issue.
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.
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.
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.
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.
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.
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.
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.
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.
To generate an SSH key, download the simple software, PuTTY — for Windows users.
Download it. Install it. Open it. Keep in mind open PuTTYgen, not PuTTY.
It will show you a simple interface.
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.
Both saved keys will appear like the screenshot below:
Now go back to Digital Ocean, and click 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.
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.
Step 7 – Installing aaPanel
To install aaPanel, you need a little bit of patience.
After a few seconds, you’ll see the 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.
So copy the ipv4 and paste it into the HostName of 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.
It shows an alert message.
Now type root, it will successfully enter the terminal like this:
Now copy the line as shown below:
Now paste the Ubuntu line into the Putty.
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?”
It starts downloading the panel. It might take from 5 minutes to 10 minutes. Have patience.
Once it’s installed, you’ll get the aaPanel Internet Address, username, and password. Copy them and paste them into your 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.
Put the username and password that aaPanel provided in the terminal.
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.
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.
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
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.
When all the software packages are installed, you’ll see the message.
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.
I recommend installing all these software packages:
- OneClick Deployment
- Google Drive
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.
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.
Once done, click Submit.
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.
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.
Once you’ve created your account, click Add a site.
Enter your website to add to the Cloudflare network.
Select the free plan.
Copy the Cloudflare’s nameservers.
And paste into your domain registrar.
Now go back to Cloudflare, and click Done, check nameservers.
And click Finish.
It takes a few minutes to complete the DNS propagation. Sometimes, it might take an hour too.
Once done, go to the DNS section and export all your records in case something goes wrong.
I’m going to delete all the DNS records.
As I have added the website to Cloudflare, I need to put the Digital Ocean’s name servers.
You have to add three name servers like these:
Now we need to add the A Record.
In a nutshell, you have to add four records: 3 nameservers and 1 A Record.
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.
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.
As you can see how I set up the API.
The free SSL is being installed, and it’s automatically renewed for a lifetime.
Sometimes your website might give you an error like this:
It happens when you don’t put the SSL to 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.
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.
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.
Don’t forget to create backups of your database; otherwise, your backups are useless.
These backups are stored on your Google Drive in your bt_backup folder.
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.
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.
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.
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.