This guide installs Joomla on a self-hosted Linux server.
| Component | Joomla 5 | Joomla 6 |
|---|---|---|
| PHP | 8.1+ | 8.3+ |
| MySQL | 8.0.13+ | 8.0.13+ |
| MariaDB | 10.4+ | 10.4+ |
| PostgreSQL | 13+ | 13+ |
mysqlipdo_mysql (or pdo_pgsql for PostgreSQL)jsonxmlmbstringgd or imagickintlzipzlibcurlInstall a LAMP (Linux, Apache, MySQL, PHP) or LEMP (Linux, Nginx, MySQL, PHP) stack:
Ubuntu/Debian (LAMP):
sudo apt update
sudo apt install apache2 mariadb-server php php-mysql php-xml php-mbstring php-curl php-zip php-gd php-intl php-mysqli unzip
RHEL/CentOS:
sudo dnf install httpd mariadb-server php php-mysqlnd php-xml php-mbstring php-curl php-zip php-gd php-intl unzip
Create a MySQL database and user for Joomla:
mysql -u root -p
CREATE DATABASE joomla DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'joomla'@'localhost' IDENTIFIED BY 'strong-password-here';
GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Download Joomla from the official downloads page:
cd /tmp
wget https://downloads.joomla.org/cms/joomla6/Joomla_6.0.3-Stable-Full_Package.zip
Extract Joomla to your web root:
sudo mkdir -p /var/www/joomla
sudo unzip Joomla_6.0.3-Stable-Full_Package.zip -d /var/www/joomla
Set correct ownership and permissions:
# Set ownership (adjust for your web server user)
sudo chown -R www-data:www-data /var/www/joomla
# Set directory permissions to 755
find /var/www/joomla -type d -exec chmod 755 {} \;
# Set file permissions to 644
find /var/www/joomla -type f -exec chmod 644 {} \;
Apache: Create a virtual host pointing to /var/www/joomla. Ensure mod_rewrite is enabled.
Nginx: Configure server block with PHP-FPM, root pointing to /var/www/joomla.
Open http://YOUR-SERVER/joomla in your browser.
The Joomla installer will guide you through:
See Joomla Configuration for configuration guidance.
See Joomla Security for hardening guidance.
Prefer automation? See these Ansible setup options:
Prefer containers? See Joomla Docker Setup.
Setting up Joomla can be complex. We offer consulting services for:
Contact us at office@linux-server-admin.com or visit our contact page.