Skip to main content

How to Install Joomla on Ubuntu 22.04 (Step-by-Step Guide)

·426 words·2 mins
Joomla Ubuntu LAMP Web Server CMS
Table of Contents

How to Install Joomla on Ubuntu 22.04 (Step-by-Step Guide)

Joomla is a powerful, open-source content management system (CMS) written in PHP. It is widely used to build and manage websites, from simple blogs to complex enterprise platforms.

In this guide, you’ll learn how to install Joomla on Ubuntu 22.04 using a LAMP stack (Linux, Apache, MySQL, PHP).


🧰 Prerequisites
#

Before starting, ensure you have:

  • Ubuntu 22.04 server
  • Root or sudo access
  • Domain name (optional but recommended)
  • Internet connection

⚙️ Step 1: Install LAMP Stack
#

First, install Apache, MySQL, PHP, and required PHP extensions.

sudo apt update
sudo apt install apache2 mysql-server php8.1 libapache2-mod-php8.1 php8.1-dev php8.1-bcmath php8.1-intl php8.1-soap php8.1-zip php8.1-curl php8.1-mbstring php8.1-mysql php8.1-gd php8.1-xml unzip -y

Start and Enable Apache
#

sudo systemctl start apache2
sudo systemctl enable apache2

🗄️ Step 2: Create Joomla Database
#

Joomla requires a MySQL database.

Access MySQL Shell
#

sudo mysql

Create Database and User
#

CREATE DATABASE joomla;
CREATE USER 'joomla'@'localhost' IDENTIFIED BY 'securepassword';
GRANT ALL ON joomla.* TO 'joomla'@'localhost';
FLUSH PRIVILEGES;
EXIT;

📦 Step 3: Download and Install Joomla
#

Download Joomla
#

wget https://downloads.joomla.org/cms/joomla5/5-2-3/Joomla_5-2-3-Stable-Full_Package.zip

Extract Files
#

sudo unzip Joomla_5-2-3-Stable-Full_Package.zip -d /var/www/html/joomla

Set Permissions
#

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

🌐 Step 4: Configure Apache Virtual Host
#

Create a new Apache configuration file:

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

Add Configuration
#

<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    ServerName joomla.example.com
    DocumentRoot /var/www/html/joomla

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

    ErrorLog ${APACHE_LOG_DIR}/joomla_error.log
    CustomLog ${APACHE_LOG_DIR}/joomla_access.log combined
</VirtualHost>

Enable Site and Rewrite Module
#

sudo a2ensite joomla.conf
sudo a2enmod rewrite

Restart Apache
#

sudo systemctl restart apache2

🌍 Step 5: Access Joomla Web Installer
#

Open your browser and navigate to:

http://joomla.example.com

Installation Steps
#

  1. Select language

  2. Enter site name and admin credentials

  3. Configure database:

    • Database type: MySQLi
    • Database name: joomla
    • Username: joomla
    • Password: securepassword
  4. Click Install Joomla

Once completed:

  • Click Open Administrator
  • Log in to access the Joomla dashboard

🧯 Troubleshooting Tips
#

Issue Solution
Apache not starting Check systemctl status apache2
Permission errors Verify ownership with www-data
Database connection fails Confirm DB credentials
Page not loading Check firewall and DNS

📌 Best Practices
#

  • Use a strong database password
  • Enable HTTPS with Let’s Encrypt
  • Regularly update Joomla and extensions
  • Backup your website and database
  • Restrict admin access for security

✅ Conclusion
#

You have successfully installed Joomla on Ubuntu 22.04 using a LAMP stack.

You can now:

  • Build and manage your website
  • Install themes and extensions
  • Customize your Joomla dashboard

Joomla provides a flexible and powerful platform for creating modern websites with ease.

Related

Debian 13.3 Released: What It Means for Ubuntu 26.04 LTS
·537 words·3 mins
Debian Ubuntu Linux DevOps
The Souls of Linux: The Visionaries Behind the Open-Source Revolution
·719 words·4 mins
Linux Open Source GNU Debian Ubuntu Kernel Development Free Software
Mastering WSL with Ubuntu 24.04: Fast, Portable Dev Environments
·535 words·3 mins
Ubuntu WSL Windows Linux Development