In this article, we will teach you How to Install Joomla on Ubuntu 21.04 step by step. Joomla site builder, like any other site builder system, will allow you to build a site. As you know, to create a site on the Internet, after purchasing hosts and domains, you need to choose a suitable site builder who can install data on the hosts and connect to the database to be able to put data in it. This site builder system can be used in three different ways, including proprietary site builder systems, free sites builder systems such as Joomla, WordPress, Drupal, and ready site builder systems such as a portal.

Learn Install Joomla on Ubuntu Linux VPS

Introduction to Joomla

Joomla is a free, open-source content management system released under the GNU/GPL License. Joomla is built with PHP programming language and uses an MVC-based framework and uses the MySQL database to store data. Types of small and large business websites, online businesses, e-service portals, government agency websites, educational websites and e-learning portals, websites News and even small personal websites are implemented by Joomla.

Prerequisites to Install Joomla on Ubuntu 21.04

First of all, you need to update the system packages and repositories. To update the system, just enter the following commands:

sudo apt update -y
sudo apt upgrade -y

You need to install PHP because Joomla is written in PHP and stores data in MySQL. You must also install Apache, as the Apache webserver serves Joomla pages, and users can access any Joomla Site through a browser.

Now you can Install PHP by running the following command:

sudo apt install apache2 libapache2-mod-php7.2 openssl php-imagick php7.2-common php7.2-curl php7.2-gd php7.2-imap php7.2-intl php7.2-json php7.2-ldap php7.2-mbstring php7.2-mysql php7.2-pgsql php-smbclient php-ssh2 php7.2-sqlite3 php7.2-xml php7.2-zip

Enter the following command to verify the installed Apache version:

sudo dpkg -l apache2

Run the following command to start the Apache server:

sudo systemctl start apache2

You can also enable Apache with the following command:

sudo systemctl enable apache2

You can confirm Apache is running by entering the following command:

sudo systemctl status apache2

In this step, after head over to your browser, you have to type in the IP address in the URL bar:


Verify Apache on ubuntu

Note: This image shows that Apache is installed and running.

You must confirm the PHP installation by running the following command:

php -v

Joomla needs a database in the backend to store its data. To do this, you must install the MariaDB relational database server, which is a FORK of MySQL. MariaDB is an open-source and free database.

You can install MariaDB by running the following command:

sudo apt install mariadb-server

Enter the following command to secure the MariaDB database engine:

sudo mysql_secure_installation

When you are asked for the root password you have to hit Enter and by pressing “Y” you can set the root password.

To strengthen its security, just type “Y” for the remainder of the section and finally press Enter to set its recommended settings.

To create a database to store files, you must first log in to MariaDB. Enter the following command:

sudo mysql -u root -p

You should create the database, database user, and grant privileges to the database user, enter the following commands:

MariaDB [(none)]> create user 'USER_NAME'@'localhost' identified by 'PASSWORD';
MariaDB [(none)]> CREATE DATABASE joomla_db;
MariaDB [(none)]> GRANT ALL ON joomla_db.* TO ‘joomla_user’@’localhost’ IDENTIFIED BY ‘[email protected]’;
MariaDB [(none)]> EXIT;

How to Install Joomla on Ubuntu 21.04

In this step, you can easily download the Joomla installation package by entering the following command:

sudo wget

To make the directory you can name the list “Joomla” or whatever name you want:

sudo mkdir /var/www/html/joomla

Now you must unzip the Joomla file. To do this, run the following command:

sudo unzip -d /var/www/html/joomla

In this step, you can set the directory ownership of the directory to the Apache user by entering the following command:

sudo chown -R www-data:www-data /var/www/html/joomla

Run the following command to change permissions:

sudo chmod -R 755 /var/www/html/joomla

Now you need to restart the Apache server with the following command to apply the changes:

sudo systemctl restart apache2

How to Configure Apache for Joomla

To configure Apache for Joomla, you must first create a virtual host file for Joomla and name it Joomla.conf:

sudo vim /etc/apache2/sites-available/joomla.conf

Now you need to enter the following configuration in the file and then save it.

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/joomla/

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/html/joomla/>
Options FollowSymlinks
AllowOverride All
Require all granted

To enable the virtual host’s file, run the following commands:

sudo a2ensite joomla.conf
sudo a2enmod rewrite

Restart the Apache webserver service with the following command to apply the changes:

sudo systemctl restart apache2

How to Setup and Run Joomla on Ubuntu 21.04

To finalize the Joomla installation, launch Joomla through a web browser. To do this, browse your server URL according to the following command:

http:// server-IP/joomla

After opening the webpage, you must fill in the required details and then click “Next“:

Joomla configuration

On this page, you have to fill in the database details and click “Next“.

Joomla MySQL settings

Since this page shows an overview of all the settings, you can do a pre-installation check:

Joomla installation overview

Refer to the “Pre-installation Check” and “Recommended settings” sections to confirm the required installation packages and the correct settings:

Joomla pre-installation check

Click “Install“.

After the installation is complete, you will receive a Joomla Installation notification.

Joomla installation progress

You must delete the installation folder before logging in. To do this, scroll down and click on “Remove installation folder“.

Remove Joomla installation directory - Install Joomla on Ubuntu 21.04

Click on “Administrator” to log in:

Joomla admin login - Install Joomla on Ubuntu 21.04

Click “Log in” after entering your username and password. You are now logged in to the Joomla Dashboard.

Joomla dashboard in ubuntu- Install Joomla on Ubuntu 21.04

Joomla Installation process on Ubuntu 21.04 completed.


In this article, we introduced Joomla and enumerated its features. Also in this article, we taught you how to install Joomla on Ubuntu 21.04. With the help of this step-by-step tutorial, you can easily install Joomla on your Ubuntu 21.04.

Rate this post