Skip to content
Follow
CMS

How to install Joomla with Apache on Ubuntu 24.04

Richard
Written by
Richard
May 30, 2024 Updated Jul 13, 2026 7 min read
How to install Joomla with Apache on Ubuntu 24.04
How to install Joomla with Apache on Ubuntu 24.04

Installing Joomla with Apache on Ubuntu 24.04 involves setting up the necessary web server software and then putting the Joomla content management system in place.

Joomla is a popular free tool that helps you build websites, and Apache is the software that shows your website to visitors.

This guide will walk you through setting up Apache, a web server, on Ubuntu 24.04 LTS, also known as Noble Numbat, to host your Joomla site.

You’ll typically need a database, like MySQL, to store your website’s information for Joomla to use.

⚡ Quick Answer

Install Apache using `sudo apt install apache2`, then MariaDB with `sudo apt install mariadb-server`. Create a database and user for Joomla, and install PHP using `apt install php libapache2-mod-php php-mysql`.

Install Apache HTTP server on Ubuntu Linux

Install the Apache web server on Ubuntu Linux to make your website accessible online. You can install Apache by opening your terminal and running commands to update your package list, then installing the software. This lets you start, stop, and manage your web server easily.

To do that, open the Ubuntu terminal and run the commands below to install the Apache web server.

🐧Bash / Shell
sudo apt update
sudo apt install apache2

Once Apache is installed, the commands below can start, stop, and enable the Apache web server to start automatically when your server boots up.

🐧Bash / Shell
sudo systemctl stop apache2
sudo systemctl start apache2
sudo systemctl enable apache2

You can test that the Apache web server is running by opening your web browser and browsing to the server’s localhost or IP address.

http://localhost

Apache2 Default Page displayed after installation on Ubuntu 24.04
Apache2 Default Page displayed after installation on Ubuntu 24.04

When you see the Apache2 Default Page, it means the Apache HTTP server is successfully installed.

Additional help on installing Apache on Ubuntu is in the link below.

How to install Apache on Ubuntu

Install MariaDB database server on Ubuntu Linux

Joomla needs a database to store its information, and MariaDB is a great choice for your Ubuntu Linux system. You can install the MariaDB database server easily using your terminal. Just run the update and install commands to set up MariaDB for your Joomla site.

To install and use the MariaDB database server, use the instructions below.

Open the Ubuntu terminal and run the commands below to install the MariaDB database server.

🐧Bash / Shell
sudo apt update
sudo apt install mariadb-server

Once the MariaDB database server is installed, use the commands below to stop, start, and enable the MariaDB server to start automatically when the server boots.

🐧Bash / Shell
sudo systemctl stop mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb

Run the following commands to validate and test if the MariaDB database server is installed successfully.

🐧Bash / Shell
sudo mariadb

Once you run the commands above, it will log you onto the MariaDB console and display a message similar to the one below.

💻Code
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 32
Server version: 10.11.2-MariaDB-1 Ubuntu 23.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> 

The message tells you that the server is installed successfully.

Additional help on installing MariaDB.

Create a Joomla database

After installing MariaDB, create a specific database for your Joomla website. This new, empty database will hold all your Joomla content and data. We will create a database named ‘joomlaadb’ and a user for it to set up Joomla correctly.

The MySQL database serves as the repository for all Joomla application content and data, highlighting the MySQL database's significance in the Joomla setup process.

As part of the setup, we will create a database named ‘joomlaadb’ and a corresponding user account named ‘joomladbuser‘.

Finally, give the joomladbuser full access to the joomladb database.

All the database steps above can be done using the commands below:

But first, log on to the MariaDB database server:

🐧Bash / Shell
sudo mariadb

Then run the commands below to complete the steps:

💻Code
CREATE DATABASE joomladb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER joomladbuser@localhost IDENTIFIED BY 'type_your_password_here';
GRANT ALL ON joomladb.* TO joomladbuser@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
⚠️Warning
Ensure to replace ‘type_your_password_here‘ with your password.

Install PHP on Ubuntu Linux

Joomla requires PHP to work, so you need to install it on your Ubuntu Linux system. It’s important to also install essential modules like libapache2-mod-php and php-mysql. These help PHP work correctly with the Apache web server and your database.

Run the commands below to install PHP.

🐧Bash / Shell
sudo apt install php libapache2-mod-php php-intl php-mysql php-curl php-cli php-zip php-gd php-common php-mbstring php-xmlrpc php-json php-sqlite3 php-zip

Additional help on installing PHP

How to install PHP on Ubuntu Linux

Download Joomla files

To get your Joomla site running on Ubuntu Linux, download the Joomla files and place them in the correct folder for the Apache web server. The commands provided help you create a Joomla folder in the Apache root and download the latest files.

The command block below will download and create a new Joomla folder in the Apache root directory.

First, create a Joomla folder in the Apache root directory.

You will download Joomla files into the `/tmp` directory. After unzipping the Joomla file, you will move the unzipped Joomla content into the Joomla folder you previously created in the Apache root directory.

Rest assured, the final step is to change the permissions. This will allow the Apache web server to safely interact with the files, ensuring a secure environment for your Joomla installation.

Stay up-to-date with the Latest Joomla version. Get it from the official download page and replace the link with the new version so you can benefit from the latest features and security updates.

🐧Bash / Shell
sudo mkdir -p /var/www/joomla
cd /tmp/
wget https://downloads.joomla.org/cms/joomla5/5-1-1/Joomla_5-1-1-Stable-Full_Package.zip
sudo unzip -d /var/www/joomla Joomla_*.zip
sudo chown -R www-data:www-data /var/www/joomla/

Once you have completed all the above steps, continue below to configure the Apache web server to serve the Joomla content.

Run the commands below to create an Apache virtual host file for Joomla.

🐧Bash / Shell
sudo nano /etc/apache2/sites-available/joomla.conf

Then, copy and paste the content block below into the Apache server block.

💻Code
<VirtualHost *:80>
ServerName joomla.example.com
ServerAlias www.joomla.example.com
ServerAdmin admin@example.com
DocumentRoot /var/www/joomla

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

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

</VirtualHost>

Save the file.

The Apache server block for Joomla will be enabled by running the `sudo a2ensite joomla.conf` command, followed by restarting the Apache server using `sudo systemctl restart apache2`. This action applies the new website configuration, making your Joomla installation accessible through your web browser.

🐧Bash / Shell
sudo a2ensite joomla.conf
sudo systemctl restart apache2

Setup Let’sLet’sypt SSL/TLS for Joomla

Securing your Joomla website with HTTPS using Let’s Encrypt is important for trust and safety on Ubuntu Linux with Apache. Let’s Encrypt provides free SSL/TLS certificates to enable HTTPS for your Joomla site. This helps protect data exchanged between your visitors and your website.

Please read the post below for additional resources on installing and creating Let’sLet’sypt SSL certificates for Apache.

How to set up Let’sLet’sypt SSL certificate for Apache on Ubuntu Linux

After installing, the Apache server block file /etc/apache2/sites-available/joomla.conf will automatically be configured with HTTPS, done by the Certbot Apache plugin.

Once you have restarted the Apache web server, open your browser and browse to the server hostname or IP address defined in the Apache server block.

💻Code
http://joomla.example.com

A Joomla installation wizard page should appear. Select the installation language, enter the site name and continue to the next page.

Joomla select installation language and site name
Joomla select installation language and site name

Next, enter your name, username, password for your account, email address and continue to the next page.

Joomla set up account details
Joomla set up account details

On the next page, type in the database name, username, and password created above. Then, click “Install Joomla.”

Joomla database connection setup screen on Ubuntu 24.04
Joomla database connection setup screen on Ubuntu 24.04

Your new Joomla site should be created and ready to use.

Joomla setup complete
Joomla setup complete

That should do it!

Conclusion:

  • This comprehensive guide has equipped you with the steps to set up a Joomla site on an Ubuntu server with Apache support. This allows you to harness the power of Joomla while benefiting from the stability of the Apache web server on the Ubuntu operating system.
  • You now have the knowledge to install and configure essential components such as Apache, MariaDB, and PHP, create a Joomla database, and download the Joomla files.
  • By following this guide, you also learned how to enhance the security of your Joomla installation with Let’sLet’sypt SSL/TLS certificates.
  • This detailed walkthrough has given you the tools and understanding to seamlessly create and manage dynamic websites using Joomla on a robust and scalable platform.
  • Should you have any feedback or additional insights, please utilize the comments section below the article.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Setup Joomla on Ubuntu with Nginx & Cloudflare
CMS How to Setup Joomla on Ubuntu with Nginx & Cloudflare
How to Install NetData on Ubuntu 24.04
Ubuntu Linux How to Install NetData on Ubuntu 24.04
How to Install Emby Media Server on Ubuntu 24.04
Ubuntu Linux How to Install Emby Media Server on Ubuntu 24.04
How to Install PhpStorm on Ubuntu 24.04
Ubuntu Linux How to Install PhpStorm on Ubuntu 24.04

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *