In this tutorial, we will show you how to install WonderCMS on Ubuntu 20.04 LTS. For those of you who didn’t know, WonderCMS is a free, open-source, and flat-file content management system written in PHP and jQuery. WonderCMS also doesn’t require a traditional/relational database like MariaDB. The flat file technology enables WonderCMS to save all data to a text file (flat file) called database.js which is structured in JSON format. It also offers a rich set of features including, a custom login URL, SEO friendly, WYSIWYG, flexible CSS framework, native markdown, and more.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of WonderCMS on an Ubuntu 20.04 Focal Fossa server. You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
Prerequisites
- A server running one of the following operating systems: Ubuntu 20.04, 18.04, and any other Debian-based distribution like Linux Mint or elementary OS.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install WonderCMS on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running the following apt
commands in the terminal.
sudo apt update sudo apt upgrade
Step 2. Install the LAMP server.
A Ubuntu 20.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.
Step 3. Installing WonderCMS on Ubuntu 20.04.
By default, WonderCMS is not available on Ubuntu 20.04 base repository. Now we run the commands below to clone installer WonderCMS from GitHub:
git clone https://github.com/robiso/wondercms.git /var/www/html/wondercms
We will need to change some folders permissions:
chown -R www-data:www-data /var/www/html/wondercms
Step 4. Configure Apache WonderCMS Site.
Now we create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘wondercms.conf
’ on your virtual server:
sudo nano /etc/apache2/sites-available/wondercms.conf
Add the following file:
<VirtualHost *:80> ServerAdmin admin@your-domain.com ServerName your-domain.com ServerAlias www.your-domain.com DocumentRoot /var/www/html/wondercms/ <Directory /> Options +Indexes +FollowSymLinks +ExecCGI AllowOverride All Order deny,allow Allow from all Require all granted </Directory> <Directory /var/www/html/wondercms> Require all denied </Directory> ErrorLog /var/log/apache2/wondercms_error_log TransferLog /var/log/apache2/wondercms_access_log </VirtualHost>
Save and close the file, then restart the Apache webserver so that the changes take place:
sudo a2enmod rewrite sudo a2ensite wondercms.conf sudo systemctl restart apache2
Step 5. Set up HTTPS.
We should enable a secure HTTPS connection on PrestaShop. We can obtain a free TLS certificate from Let’s Encrypt. Install Let’s Encrypt client (certbot) from Ubuntu 20.04 repository:
sudo apt install certbot python3-certbot-apache
Next, run the following command to obtain a free TLS certificate using the Apache plugin:
certbot --apache -d your-domain.com
You will be asked to provide your email and accept the term of service:
Enabled Apache rewrite module Redirecting vhost in /etc/apache2/sites-available/wondercms.conf to ssl vhost in /etc/apache2/sites-available/wondercms-le-ssl.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations! You have successfully enabled https://your-domain.com You should test your configuration at: https://www.ssllabs.com/ssltest/analyze.html?d=your-domain.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/your-domain.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/your-domain.com/privkey.pem Your cert will expire on 2022-06-11. To obtain a new or tweaked version of this certificate in the future, simply run certbot again with the "certonly" option. To non-interactively renew *all* of your certificates, run "certbot renew" - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
If the test is successful, reload Apache for the change to take effect:
sudo apache2ctl -t sudo systemctl reload apache2
Step 6. Configure Firewall.
By default, the UFW firewall is enabled on Ubuntu. Depending on your Apache virtual host configuration file, open ports 80 and 443 to allow HTTP and HTTPS traffic:
sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw reload
Step 7. Accessing WonderCMS Web Interface.
Once successfully installed, open your web browser and access the WonderCMS web interface using the URL https://your-domain.com
. You should see the WonderCMS containing the login password:
Then, access the WonderCMS login page using the URL https://your-domian/loginURL
. You should see the WonderCMS login page:
Congratulations! You have successfully installed WonderCMS. Thanks for using this tutorial for installing WonderCMS on your Ubuntu 20.04 LTS Focal Fossa. For additional help or useful information, we recommend you to check the official Matomo website.