How to Install Joomla on Ubuntu 24.04 with Nginx, MariaDB, and PHP
Introduction
Joomla is a powerful, open-source content management system (CMS) built with PHP. It’s widely used for creating websites, blogs, e-commerce platforms, forums, and other web-based applications.
In this tutorial, you’ll learn how to set up Joomla on an Ubuntu 24.04 server using the LEMP stack (Linux, Nginx, MariaDB, PHP-FPM). We’ll also configure your Joomla site to use HTTPS for secure communication.
What You’ll Need
Before getting started, make sure you have:
-
An Ubuntu 24.04 server instance
-
A user with sudo privileges (non-root)
-
A domain name pointing to your server’s IP
Step 1: Install Required Packages
Since Joomla runs on PHP, we’ll start by installing the LEMP stack.
Update System Packages
Install Nginx, MariaDB, and PHP with Extensions
Confirm with Y
when prompted.
Step 2: Verify Services Are Running
Check Nginx Status
Check MariaDB
Check PHP-FPM
Step 3: Tune PHP-FPM for Joomla
Edit the PHP configuration file:
Update the following values:
Save the file and restart PHP-FPM:
Check the PHP socket:
You should see something like /var/run/php/php8.3-fpm.sock
.
Step 4: Configure the MariaDB Database
Secure the Database Server
Run the built-in security script:
Follow the prompts:
-
Press
ENTER
for no root password (if using default install) -
Say
n
when asked aboutunix_socket
authentication -
Set a new root password
-
Disable remote root login
-
Remove the test database and anonymous users
-
Reload privileges
Create a Joomla Database and User
In the MariaDB shell:
Confirm the user privileges:
Step 5: Download Joomla
Navigate to your web root:
Download Joomla (replace with the latest version URL):
Extract the archive:
Set the correct permissions:
Step 6: Create an Nginx Server Block
Create a new Nginx configuration file:
Add the following configuration (replace yourdomain.com
with your actual domain):
Save and close the file.
Enable the configuration and check syntax:
Restart Nginx:
Final Step: Complete Joomla Setup via Web Installer
Now open your browser and navigate to:
Conclusion.
Congratulations! Joomla is now installed on your Ubuntu 24.04 server with Nginx, MariaDB, PHP-FPM, and secured with HTTPS via Let’s Encrypt.