Basic WordPress site setup with aaPanel
Last updated: January 23rd 2023
Introduction
WordPress is the most popular CMS in the world for quite some time. It is so popular, that it drives almost 40% of the current websites.
In this guide, we will install and setup a basic WordPress site with aaPanel.
Pre-requisites
Please make sure you fulfill the prerequisites for this guide.
- Fresh & clean Ubuntu Focal installation (or above)
- Registered and valid domain (preferable with no DNS records aka new)
- User with root privileges (sudoer) - You will need shell access, read more here on how to get shell access to your server.
We already published an article about installing, securing, and connecting your domain with the aaPanel software. So please check it: How to Install and configure aaPanel on Ubuntu. This tutorial is a direct sequel to the mentioned article, so please make sure you have done as mentioned there.
In this article, we will avoid "one-click deployers" and do things manually. This way, all future troubleshooting is much easier.
Create Database
Create a database and write down credentials. From left pane select: Database > Add Database
Add website
We will create a generic website.
Populate domain name and skip database selection, since we are going to set it up through the WordPress installer.
Now,
- Go to WordPress.org and download the zip file.
- Unpack all files into the website folder (be aware of the nested WordPress folder inside the archive).
- Visit the website from your browser.
If you have done everything properly, you should see the WordPress install screen. Proceed with the installation until you see admin panel.
Now, go to website configuration screen and setup rewrite rule:
Be informed that we are using NGINX as our web server, so rewrite rules should match the NGINX pattern (consult prequel article mentioned above).
Redis as your cache engine
The beauty of owning your own web server instead of using shared hosting for your WordPress website is in freedom of using advanced software, usually not available on shared hosts. Redis is an in-memory cache engine with the ultimate speed of accessing pre-compiled pages, instead of using HDD as storage space.
As mentioned in the previous article, your Redis application is already installed with the PHP redis extension.
Notice: Whenever you install a new version of PHP, you need to install extensions again for that particular version.
Let´s install an appropriate plugin.
Install, activate and enable drop-in, and you are ready to go. If everything is ok you should see a screen like this:
Basic security settings
WordPress is a very popular CMS engine, thus making it a very popular target for hacker attacks. There is no perfect defense and all we can do is make life harder for any possible attacker. Here is the list of what you should do right after deployment to strengthen WordPress installation.
In aaPanel website configuration:
- turn ON session isolation. [ Site modification > PHP version ]
- turn ON Anti-XSS attack. [ Site modification > Site Directory ]
Install WP security plugins:
- WordFence or Sucuri plugin, at least free versions.
- Hide Login URL. Bots will try to exploit weak and commonly used passwords to login in on your behalf. Hiding/changing usual login URLs will render obsolete any brute force login.
- Hide or disable the xmlrpc.php file but beware, some of the plugins might need this service.
If your hosting provider creates daily basis backup snapshots (like here on Webdock), you are more than welcome to turn ON automatic plugin/theme updates.
Also, worth mentioning: always use very strong passwords and plugins with good reviews and which are regularly updated. The plugin download statistic is more like a guideline, not necessarily proof of the quality (due to high downloads, prone to an extensive search for exploits).
With these simple security measures, your WordPress installation is pretty much secured from 95% of attacks and almost 100% of generic bot attacks.
Troubleshooting and common mistakes
Here are the two most common errors every WordPress developer experiences at least once in their career.
1. Import failed. Theme demo content can not be processed and/or uploaded
This error is almost exclusively related to your php.ini settings. While default settings are really OK for website everyday functioning, imports can be really heavy. In one of my previous articles I already explained development php.ini settings, so I'll repeat it here (if not stated otherwise by your theme developer team):
option | default value | new value | known issues |
---|---|---|---|
max_execution_time | 300 | do not change | WP users 1000, demo upload |
max_input_time | 60 | do not change | WP users 400, demo upload |
memory_limit | 128M | 2G | Composer memory exhaust; installing packages |
post_max_size | 50M | do not change | WP users 256M, demo upload |
upload_max_filesize | 50M | do not change | WP users 256M, demo upload |
date.timezone | PRC | UTC | do not change if you are in Bejing |
Remember your default settings, so you can revert it back after a successful demo import.
2. Can not install theme or plugin, access denied, folder not writable, need FTP account settings.
No, you actually do not need to provide FTP settings or install FTP service. The problem is with your bad file/directory permissions/ownership where WP is installed. All files inside the WP installation directory should be with 644 permission, while directories with 755. Ownership for both should be www.
Only exclusivity from this rule are server-specific files where files are owned by root user like .htaccess or .user.ini, which is good to know if you are going to use firewall plugins (you need to change ownership for a brief period of time and then revert back).
Conclusion
The combination of the VPS + Ubuntu + aaPanel is a very powerful solution for every WordPress developer. The aaPanel only lacks a multiuser approach, but for those who own multiple WordPress websites, it is an almost perfect solution.
As you can see from this article, the advantages are numerous:
- full control of the environment and websites
- no limit to using advanced software
- no more third-party SSL plugins, or expensive certificates (a sinkhole of your budget for shared hosting)
- affordability
So, this should work well both for experienced WordPress developers and enthusiasts. Hope it helps!
Series Author: Aleksandar Milivojevic is a PHP programmer for over 12 years (Laravel and WordPress). Writing articles in brief pauses between projects, to help out the community and popularize PHP in general.
Related articles
-
How to install OpenLiteSpeed on Webdock
In this article we show you how you can install the OpenLiteSpeed web server on Ubuntu Jammy.
Last updated: March 29th 2023
-
How to Deploy your First Node.js Application on your Ubuntu Web Server
Deploy a Node.js application on your Ubuntu server and how to issue SSL certificates for your Node application.
Last updated: July 19th 2023
-
How to set up WireGuard on your Webdock Server
This article details how you can quickly and easily install WireGuard on your Webdock Server.
Last updated: July 21st 2024
-
How to set up OpenVPN on your Webdock Server
This article details how you can quickly and easily set up a VPN on your Webdock server.
Last updated: November 10th 2022
-
How to Install and configure aaPanel on Ubuntu
Install aaPanel on Ubuntu as well as building a LEMP stack, pointing your domain to your server and setting SSL certificates with Let's Encrypt.
Last updated: November 10th 2022
-
How to install azuracast on Webdock
This guide shows you how to work around certain issues when installing azuracast on Webdock.
Last updated: November 10th 2022
-
How to set up Runcloud on Webdock
This article details the steps you need to go through in order to install Runcloud on a Webdock server.
Last updated: July 29th 2024
-
How to set up cPanel on Webdock
This article details the steps you need to go through in order to install cPanel on a Webdock server.
Last updated: September 23rd 2024
-
How to set up Gridpane on Webdock
This article details the steps you need to go through in order to install Gridpane on a Webdock server.
Last updated: November 10th 2022
-
How to set up Ploi on Webdock
This article details the steps you need to go through in order to install Ploi on a Webdock server.
Last updated: November 10th 2022
-
How to set up Laravel Forge on Webdock
This article details the steps you need to go through in order to install Laravel Forge on a Webdock server.
Last updated: November 10th 2022
-
How to set up Plesk on Webdock
This article details the steps you need to go through in order to install Plesk on a Webdock server.
Last updated: November 10th 2022
-
How to set up Cyberpanel on Webdock
This article details the steps you need to go through in order to install Cyberpanel on a Webdock server.
Last updated: December 9th 2023
-
How to set up SpinupWP on Webdock
This article details the steps you need to go through in order to installSpinupWP on a Webdock server.
Last updated: March 15th 2023
-
How to set up DirectAdmin on Webdock
This article details the steps you need to go through in order to install DirectAdmin on a Webdock server.
Last updated: September 1st 2023
-
How to set up Hestia on Webdock
This article details the steps you need to go through in order to install Hestia on a Webdock server.
Last updated: November 10th 2022
-
How to set up Virtualmin on Webdock
This article details the steps you need to go through in order to install Virtualmin on a Webdock server.
Last updated: November 10th 2022
-
How to install and create pipelines in Jenkins
This guide describes the step-by-step procedure of installing Jenkins and creating pipelines in Jenkins.
Last updated: November 10th 2022
-
How to use Nginx as reverse proxy and secure connections with SSL certificates
Using Nginx to proxy pass your site with SSL security.
Last updated: July 19th 2023
-
Setting up monitoring with Netdata on your Webdock server
Setting up monitoring on your server to receive alerts and to know real-time resource consumption on your server.
Last updated: July 19th 2023
-
How to Setup Python Web Application With Flask Gunicorn and Nginx
A simple Python Flask web app hosting with Gunicorn and Nginx
Last updated: July 19th 2023
-
How to Daemonize an Application with Systemd
Using systemd to autostart your application on system startup.
Last updated: July 19th 2023
-
Set-up New Relic Monitoring on Your Webdock Server
This guide provides step-by-step instructions to install New Relic to monitor your VPS.
Last updated: July 29th 2024
-
Getting Started with Ruby on Rails on Webdock
In this guide, we will show you how to get started with Ruby on Rails on your Webdock server
Last updated: July 19th 2023
-
How to Install VaultWarden on Your Webdock Server
This guide provided step-by-step instructions to Vaultwarden, an open-source Password Manager on your Webdock Server.
Last updated: July 19th 2023
-
How to Install the Latest Version of HTOP on Ubuntu Server
Instructions to install latest htop package on your Ubuntu server
Last updated: July 29th 2024
-
How to Install ImageMagick 7 on Ubuntu LEMP/LAMP stacks
Simple instructions to install ImageMagick 7 along with the PHP extension
Last updated: November 1st 2023
-
A Quick Guide to Installing Rust on Ubuntu
Instructions to install Rust
Last updated: December 18th 2023
-
How To Install Proxmox on Your Webdock Server
This article provides instructions on how to install Proxmox on your Webdock server
Last updated: July 29th 2024
-
How To Run Nextcloud on Your Webdock Ubuntu Server
Instructions to Install Nextcloud on your server with Docker
Last updated: February 13th 2024
-
The Ultimate Guide to Setting Up Mastodon server
A detailed guide with instructions to set up Mastodon on your Webdock server
Last updated: February 20th 2024
-
A Guide To Setting Up Mindustry Game Server on Ubuntu
Step-by-step instructions to set up your own Mindustry server
Last updated: November 4th 2024
-
A Guide to Installing ERPNext on Your Webdock Server
Step-by-step instructions to install ERPNext - a resource planning software - on your server
Last updated: May 28th 2024
-
A Beginner's Guide to Installing Apache Kafka on Ubuntu
Detailed instructions to get Kakfa running on Ubuntu!
Last updated: June 20th 2024
-
A Quick Guide To Installing Rocket Chat on Ubuntu
Instructions to install Rocket Chat on your Ubuntu server
Last updated: July 2nd 2024
-
How to Install Ghost CMS on a Webdock Server
Easily install Ghost CMS on your Webdock server with these instructions!
Last updated: September 2nd 2024
-
How to Install cPanel on a Webdock Ubuntu Server
Instructions for setting up cPanel on an Ubuntu server
Last updated: September 23rd 2024