How to Install Joomla on an Ubuntu 22.04 VPS or Dedicated Server  

How to Install Joomla on an Ubuntu 22.04 VPS or Dedicated Server  

Joomla is a popular open source content management system (CMS) used by millions of people around the world to create website content and online applications.

It’s a free CRM that’s easy to use, making it a great choice if you are new to website development. Joomla! is administered via a web-based interface, and can be installed on any server with PHP and MySQL support.

In this guide, we’ll show you how to install Joomla on an Ubuntu 22.04 VPS, or dedicated server.


How to Install Joomla on an Ubuntu 22.04

To install Joomla on an Ubuntu 22.04 VPS or dedicated server, update Ubuntu system packages, then install Apache and PHP. Create a Joomla database and database user before downloading Joomla from the Joomla downloads site. Unzip the Joomla file and configure Apache for Joomla. Finally, install Joomla and test the installation to ensure it works well.


Key Takeaways:

Here are the key takeaways from this guide on how to install Joomla on an Ubuntu 22.04 server.

  1. You need to update your server’s package repository and upgrade any existing packages to their latest versions before you start installing Joomla.
  2. You need to install Joomla dependencies (Apache, PHP, and MySQL) together with their associated modules before installing the software.
  3. Since Joomla needs a database to store its data, you’ll also need to create a Joomla database and a user with access permission to the database.
  4. You can download the latest version of Joomla from the Joomla downloads page and select your preferred download format.
  5. After downloading and configuring Joomla, you can install it on your web server and start using it to create website content.



Before installing Joomla on Ubuntu 22.04, you need the following:

  • A VPS (Ubuntu 22.04VPS) or dedicated server hosting plan
  • A domain or subdomain connecteD to you server IP
  • A VP user with sudo privileges or full SSH root access


Step 1: Install Apache

The first step is to install Apache.

However, it’s always advisable to update your server’s package repository and upgrade any existing packages to their latest versions before you start the installation.

You can do this by running the following commands:

apt-get update

install joomla on ubuntu

install joomla on ubuntu

After updating your server packages, install Apache by running the command below:

apt-get -y install apache2

install joomla on ubuntu

This command will install Joomla’s dependencies, as well as some other common PHP modules that Joomla requires.


Step 2: Install MySQL

Joomla is written in the PHP programming language and uses the MySQL database to store data.

You’ll also need to install both of these dependencies before you can install Joomla.

To install MySQL, run the following command:

apt-get -y install mysql-server

install joomla on ubuntu

install joomla on ubuntu

You’ll be prompted to enter a password for the root user. Be sure to enter a strong password.

Since the default MySQL installation is not secure, run the command below to remove anonymous users and test databases.

NOTICE: As of July 2022, trying to run mysql_secure_installation without taking some step would raise an error that will lead you to an everlasting loop.

install joomla on ubuntu

We need to undertake some steps beforehand to allow the mysql_secure_installation scripts to execute some actions that help to keep your server secure.

To avoid this loop of errors, we’ll take the steps below:

Access mysql:

install joomla on ubuntu

Then launch the following query

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

Replace the password with whatever pass you want to use

install joomla on ubuntu

Then, exit mysql

install joomla on ubuntu

Note: You can test your password strength beforehand with the VALIDATE_PASSWORD_STRENGTH mysql function.


install joomla on ubuntu

Now, you are free to execute mysql_secure_installation without running into errors.

install joomla on ubuntu

install joomla on ubuntu

The last answer will also be ‘Yes’ to reload privileges and apply the changes made:

install joomla on ubuntu

Next, you want to revert the root auth method back to the original one (auth socket). To do that, execute the following command, where you’ll be asked for the mysql root password that you just configured:

mysql -uroot -p -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"install joomla on ubuntu
Note: If, for whatever reason, you need to disable the password validation policy, launch the command:
mysql -uroot -p -e "UNINSTALL COMPONENT 'file://component_validate_password';"

You can obtain a list of the components installed as below:

install joomla on ubuntu


Step 3: Create a Database for Joomla

Next, you need to create a database where Joomla will store data:

You’ll also need to create a Joomla database user and grant them access to the Joomla database that you create.

In this guide, we will call our Joomla database user ‘joomlauser’

Log in on the MySQL Command Line Interface(CLI) using the commands below:

mysql -u root -p

install joomla on ubuntu

Enter your root password and hit Enter.

Now, create the database user and assign the right privileges using the commands below:


install joomla on ubuntu

CREATE USER 'joomla_user'@'localhost' IDENTIFIED BY 'password';

install joomla on ubuntu

GRANT ALL PRIVILEGES ON joomla.* TO 'joomla_user'@'localhost';

install joomla on ubuntu



install joomla on ubuntu

Remember to replace ‘joomla_user’ with your preferred value. Also, you should set a strong password for the user.


Step 4: Install PHP

Joomla is written in PHP – a server-side general-purpose scripting language.

So, you need to install PHP as well, together with associated modules tailored for the Apache web server, using the commands below:

apt-get -y install php libapache2-mod-php

install joomla on ubuntu

apt-get -y install php-cli php-common php-mbstring php-gd php-intl php-xml php-mysql php-zip php-curl php-xmlrpc

install joomla on ubuntu


Step 5: Install Joomla

Now that our web server, database server, and Joomla user are configured, we can download the Joomla files.

Joomla is available for download from the Joomla downloads page. From Joomla’s downloads page, select the latest version and your preferred format for downloading Joomla from Joomla’s downloads page. At the time of writing, the latest stable version is Joomla 4.3.2.

For this guide, we will download Joomla in its .zip format. Once you have selected your preferred format, click on the “Download” button to download Joomla’s codebase.

Since the download will be a zip archive, you should begin by installing the unzip tool.

apt-get -y install unzip

install joomla on ubuntu

Next, cd to the ‘/tmp’ directory and download the latest version of Joomla (4.2.3 at the time of writing) from the official website.

cd /tmp


install joomla on ubuntu

Joomla will be downloaded and stored under the archive file ‘

You need to unzip this file and copy it to the root of your website, probably under a directory name like ‘joomla’.  You can use any name for this.

So first, you make the directory

mkdir /var/www/html/joomla.

install joomla on ubuntu

Then, unzip the file

unzip -d /var/www/html/Joomla.

install joomla on ubuntu


Step 6: Configure Joomla and Assign the Right File Permissions

Now that the Joomla files are extracted, you can start configuring Joomla for your environment.

The default Joomla installation comes with a ‘htaccess.txt’ which we should copy to create a ‘.htaccess’ file. Use the commands below to do this:

cp /var/www/html/joomla/htaccess.txt /var/www/html/joomla/.htaccess

install joomla on ubuntu

First, you’ll need to change the ownership of the Joomla files to the Apache user to allow the user to access the files.

You can do this with the following commands:

chown -R www-data.www-data /var/www/html/joomla

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

install joomla on ubuntu

Restart Apache for all the PHP settings to take effect:

systemctl restart apache2

install joomla on ubuntu

Run the following command to check if apache is running:

systemctl status apache2

install joomla on ubuntu


Step 7: Finalize Joomla Installation via a browser.

Now that Joomla is downloaded and configured, you can install it on your web server.

Navigate to the URL ‘’ on your browser.

Remember to replace ‘’ with your domain name or the public IP address of your server.

To obtain your IP address, you can issue the following command:

hostname -I.

install joomla on ubuntu

Then enter your site name and select language:

install joomla on ubuntu

Fill out the fields on this page with your Joomla site’s information. The only required field on this page is the “Site Name” field.

Press Setup Login Data to advance to the following step, where you will be asked to fill in some data to create your admin account (name, username, email and password).

install joomla on ubuntu

Press Setup Database Connection to continue to the following steps where we will fulfill the form with the mysql user we created at the end of step 3

install joomla on ubuntu

Now, press Install Joomla to proceed.

Joomla will take a few moments to install. Once it is finished, you should see the Joomla installation complete page:

install joomla on ubuntu

The setup wizard will finalize the installation and you will get a congratulations message:

install joomla on ubuntu

At this point, Joomla is installed and ready to use.

Click on the “Remove Installation Folder” button to remove Joomla’s installation files. You will be taken to Joomla’s administration login page:


Step 8: Test the Installation

After completing the installation process, test the installation to ensure it works as expected.

You will have to links to test both, admin access and the main web page:

install joomla on ubuntu

The “Open Site” will take you to the main page (which is yourdomain/joomla):

install joomla on ubuntu

Whereas the “Open Administor” will take you to the admin login page (yourdomain/joomla/administrator )install joomla on ubuntu

Use the username and password that you created during Joomla’s installation process to log in to Joomla’s admin panel.

From here, you can begin configuring your Joomla site.

install joomla on ubuntu

install joomla on ubuntu



We have accomplished installing Joomla on Ubuntu 22.04 server. You can now start posting content or probably install a new theme to make your website look more professionals.

Joomla is a great content management application that you can utilize to create beautiful websites. If you’ve followed this guide step-by-step, your Joomla site should be up and running.

You can also read about Joomla versus wordpress to find out the best CMS for your needs.


Next Steps: What Now?

Now that we’ve come to the end, here are some practical steps you can take from this tutorial:


Further Reading

Here are more valuable resources to learn about Joomla and how to install and use it to create beautiful websites:




Does Joomla use Apache?

Yes, Joomla runs on Apache web server and that’s why you need to install Apache and other Joomla dependencies before installing the software. Apache is among the most popular source web servers available today.

How do I access Joomla Admin?

You can access the Joomla admin page by typing your website address followed by “/administrator.” You then input your username and password and click the “Login” button to continue to the admin page.

Does Joomla work with MariaDB?

Yes. Joomla can work with MariaDB as its database. MariaDB version 10.1 is the most recommended since it’s equal to MySQL 5.6.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top