How to Install WonderCMS on Ubuntu 20.04 (With Nginx)

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Hello, friends. I hope you are well and safe. In this post, we will show you how to install WonderCMS on Ubuntu 20.04 but using Nginx.

WonderCMS is a CMS focused on simplicity of use without sacrificing functionality. Thanks to this it is a CMS easy to use and configure, but above all it is very fast and efficient.

One of the most important features of WonderCMS is that it does not require a database driver. So, you can use it in many circumstances.

So let’s go for it and by the way, we will use Nginx as a web server and increase the performance of the web.

Preparing the system for the installation of WonderCMS

In this tutorial, we will use the root user, but you can also do it from your user with sudo access. First, access your server via SSH.

Then, update the entire operating system.

apt update
apt upgrade

Thereafter, install some packages needed to make the post.

apt install git wget unzip

Now we can continue.

Install Nginx and PHP on Ubuntu 20.04

The next step is to install Nginx and PHP on our system. To achieve this, we just need to run

apt install nginx php php-fpm php-fpm php-mbstring php-curl php-zip 

As we can see, few PHP modules are required by the tool, which gives us an idea of its power.

Now it is necessary to make some adjustments in PHP. Open PHP configuration file with PHP-fpm

nano /etc/php/7.4/fpm/php.ini

And make the following changes

file_uploads = On
allow_url_fopen = On
memory_limit = 256M
post_max_size 32
Mupload_max_filesize = 64M
max_execution_time = 300
date.timezone = "your-timezone"

To make this faster, you can use the key combination CTRL + W to search inside the file.

When you have made your changes, save them and close the editor.

To apply the changes, restart the PHP-fpm service.

systemctl restart php7.4-fpm

Install WonderCMS on Ubuntu 20.04

Now thanks to Git, clone the WonderCMS repository and download it to the system.

git clone https://github.com/robiso/wondercms.git /var/www/html/wondercms

Assign the owner of the folder

chown -R www-data:www-data /var/www/html/wondercms

And then, create a new ServerBlocks for WonderCMS

nano /etc/nginx/conf.d/wondercms.conf

Add the following

server {
    listen 80;
    server_name wondercms.unixcop.test;
    root /var/www/html/wondercms;
    index index.php;
    autoindex off;
    location / {
        if (!-e $request_filename) {
            rewrite ^/(.+)$ /index.php?page=$1 last;
        }
    }
    # prevent access to database.js
    location ~ database.js {
        return 403;
    }
    location ~ \.php(/|$) {
        include fastcgi.conf;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    }
}

Modify the value of server_name to the value of your domain.

Save the changes and close the editor. Apply the changes by restarting Nginx.

systemctl restart nginx

You can check the status of the service for any errors.

systemctl status nginx

Access to WonderCMS web interface

Now open a web browser to access your domain, where you will see the following screen.

1.- Install WonderCMS on Ubuntu 20.04
1.- Install WonderCMS on Ubuntu 20.04

You will be given the first password to use. Copy it and use it to login by clicking on the Login button.

You will see the following screen

2.- Login to the website
2.- Login to the website

Paste the generated password and login.

If everything went well, you will see this screen where you can click on the link shown to visit the security options screen. In that window, change the current password to your own and set a login URL. In my case, I have used http://mydomain.com/admin but use whatever you want.

3.- WonderCMS Running
3.- WonderCMS Running

Finally, you can refer to the How to section to get started with WonderCMS.

4.- How to section
4.- How to section

Conclusion

In this post, you learned how to install WonderCMS. This CMS stands out for being easy and simple to use. Besides not requiring a database manager, it is quite lightweight.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook