// blog

How to Install and Configure Joomla on a Linux VPS: Complete Guide

September 03, 2026 · by Alex M.

How to Install and Configure Joomla on a Linux VPS: Complete Guide

Joomla is one of the most popular Content Management Systems in the world, powering over 2 million active websites. Flexible, extensible, and backed by a massive community, Joomla is an excellent choice for corporate websites, portals, online stores, and e-learning platforms. In this complete guide, you will learn how to install and configure Joomla on a NVMe VPS running Linux — from scratch to a fully functional and secure site.

Why Run Joomla on a VPS?

Unlike shared cPanel hosting, a VPS gives you complete control over your server: you choose the PHP version, configure the web server to your needs, and manage resources yourself. If your site grows and needs more power, a SSD VPS or even a dedicated server is the natural next step.

Benefits of Joomla on a VPS:
- Full control over PHP configuration and the web server
- Better performance compared to shared hosting
- Maximum flexibility for extensions and custom templates
- Scalability — upgrade resources at any time

Prerequisites

Before starting, make sure you have:
- A VPS running Ubuntu 22.04 LTS (recommended)
- SSH access with root or sudo privileges
- A domain name pointed to your VPS IP address
- A LEMP or LAMP stack installed (Nginx/Apache + MySQL/MariaDB + PHP)

Step 1: Update the System and Install Dependencies

Connect to your VPS via SSH and update packages:

sudo apt update && sudo apt upgrade -y

Joomla requires PHP 8.1 or newer. Install PHP along with the required extensions:

sudo apt install php8.1 php8.1-fpm php8.1-mysql php8.1-xml php8.1-mbstring \
  php8.1-zip php8.1-curl php8.1-gd php8.1-intl php8.1-json \
  php8.1-opcache php8.1-bcmath -y

Verify the installed version:

php -v

Step 2: Create the Joomla Database

Joomla works with MySQL or MariaDB. Connect to MySQL:

sudo mysql -u root -p

Create the database, user, and grant permissions:

CREATE DATABASE joomla_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'joomla_user'@'localhost' IDENTIFIED BY 'VerySecurePassword123!';
GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Tip: Always use a complex password and a dedicated database user — never use root.

Step 3: Download and Install Joomla

Navigate to the web server directory and download the latest Joomla version:

cd /var/www/html
sudo mkdir joomla && cd joomla
sudo wget https://downloads.joomla.org/cms/joomla5/5-2-0/Joomla_5-2-0-Stable-Full_Package.zip
sudo apt install unzip -y
sudo unzip Joomla_5-2-0-Stable-Full_Package.zip
sudo rm Joomla_5-2-0-Stable-Full_Package.zip

Set the correct file permissions:

sudo chown -R www-data:www-data /var/www/html/joomla
sudo find /var/www/html/joomla -type f -exec chmod 644 {} \;
sudo find /var/www/html/joomla -type d -exec chmod 755 {} \;

Step 4: Configure Nginx for Joomla

Create an Nginx virtual host for your domain:

sudo nano /etc/nginx/sites-available/joomla

Add the configuration:

server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;
    root /var/www/html/joomla;
    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
        expires max;
        log_not_found off;
    }

    location ~ /\.ht {
        deny all;
    }
}

Enable the site and test the configuration:

sudo ln -s /etc/nginx/sites-available/joomla /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Step 5: Install an SSL Certificate

A site without HTTPS is penalised by Google and puts visitor data at risk. Install Let's Encrypt using Certbot:

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

Certbot will automatically update the Nginx configuration and redirect HTTP traffic to HTTPS. If you need a premium SSL certificate (OV or EV) for greater trust — you can purchase one separately.

Step 6: Joomla Web Installer

Open your browser and navigate to https://yourdomain.com. You will be greeted by the Joomla installation wizard.

6.1 Site Configuration

  • Site Name: enter your project or business name
  • Description: optional, but helpful for SEO
  • Admin Email: your email address
  • Admin Username: choose a username that is NOT "admin"
  • Password: at least 12 characters, mix of letters, numbers, and symbols

6.2 Database Configuration

  • Database Type: MySQLi
  • Hostname: localhost
  • Username: joomla_user
  • Password: the password set earlier
  • Database Name: joomla_db
  • Table Prefix: leave default or customise (e.g., jml_)

6.3 Installation

Click "Install". The process takes a few seconds. Once complete, delete the installation directory — Joomla will warn you and provide a button to remove it.

sudo rm -rf /var/www/html/joomla/installation

Step 7: Essential Post-Installation Settings

7.1 Global Configuration

From the admin panel (https://yourdomain.com/administrator), go to System → Global Configuration:

  • SEO Settings: enable "Search Engine Friendly URLs" and "Use URL Rewriting"
  • Cache: enable conservative caching for medium-traffic sites
  • Metadata: fill in the global meta description
  • Session: set session lifetime to 15-30 minutes

7.2 PHP Configuration for Joomla

Edit php.ini for optimal performance:

sudo nano /etc/php/8.1/fpm/php.ini

Recommended values:

memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 120
max_input_vars = 3000
opcache.enable = 1
opcache.memory_consumption = 128
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 10000

Restart PHP-FPM:

sudo systemctl restart php8.1-fpm

7.3 Enabling SEF URLs

If you are using Apache instead of Nginx, rename the .htaccess file:

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

This step is essential for SEF URLs to work correctly with Apache.

Step 8: Essential Joomla Extensions

Joomla truly shines through its extensions. Here are the most recommended categories:

SEO

  • EFSEO or OSMap — XML sitemap and SEO optimisation
  • JoomSEF — advanced SEF URLs

Security

  • Akeeba Backup — full site backups (database + files)
  • RSFirewall — Joomla firewall, protection against attacks
  • AdminTools — advanced security configurations

Performance

  • JotCache or Cache Cleaner — cache management
  • Lazy Load Images — deferred image loading

Forms and Contact

  • RSForm! Pro or Breezing Forms — flexible forms

Extensions are installed via System → Install → Extensions in the admin panel.

Step 9: Hardening Your Joomla Installation

Security is critical. Here are the essential steps:

9.1 Protect the Administrator Directory

Add HTTP basic authentication to /administrator:

sudo apt install apache2-utils -y
sudo htpasswd -c /etc/nginx/.htpasswd adminuser

Add to the server block in Nginx:

location /administrator {
    auth_basic "Restricted Area";
    auth_basic_user_file /etc/nginx/.htpasswd;
    try_files $uri $uri/ /index.php?$args;
}

9.2 Rename or Block the Administrator Directory

Joomla allows you to change the admin path using extensions like AdminExile — an effective way to hide the admin panel from bots.

9.3 Disable the File Editor

In Global Configuration → Text Filters, disable the PHP file editor in the backend to prevent malicious code execution.

9.4 Enable Two-Factor Authentication (2FA)

In System → Global Configuration → Users, enable two-factor authentication for administrator accounts.

9.5 Configure a Server-Level Firewall

If you don't have an active firewall yet, configure UFW:

sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

For advanced server-level protection, our server management team can configure comprehensive security solutions.

Step 10: Performance Optimisation

10.1 Enable Gzip in Nginx

Add to /etc/nginx/nginx.conf:

gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml;
gzip_min_length 256;
gzip_vary on;

10.2 Configure Joomla Cache

In System → Global Configuration → System:
- Cache Handler: File (or Memcached if installed)
- Cache Time: 15–60 minutes depending on update frequency

10.3 Database Optimisation

Via System → Maintenance → Database, you can repair and optimise Joomla tables directly from the panel. Periodically run:

OPTIMIZE TABLE jos_content, jos_categories, jos_users;

10.4 Use a CDN

For sites with visitors from multiple countries, a CDN (e.g., Cloudflare) serves static content from geographically close servers, reducing latency.

Backups — Don't Skip This Step

Setting up regular backups is mandatory. Use Akeeba Backup for scheduled backups, or create a simple script:

#!/bin/bash
DATE=$(date +%Y%m%d)
mysqldump -u joomla_user -p'VerySecurePassword123!' joomla_db > /backup/joomla_db_$DATE.sql
tar -czf /backup/joomla_files_$DATE.tar.gz /var/www/html/joomla
find /backup -name "*.sql" -mtime +7 -delete
find /backup -name "*.tar.gz" -mtime +7 -delete

Save the script and add it to crontab for daily execution:

crontab -e
# Add:
0 2 * * * /usr/local/bin/backup-joomla.sh

Keeping Joomla Updated

Keeping Joomla up to date is essential for security. From the admin panel, go to System → Update → Joomla for one-click updates. Before any major update, always create a full backup.

You can also enable automatic update notifications in System → Global Configuration → Update Notification.

Conclusion

Joomla is a mature and flexible CMS platform, perfect for complex projects that need more than a simple blog. Deployed on a Linux VPS with the right configuration — optimised PHP, performant Nginx, active SSL, and security extensions — it provides a solid foundation for any type of website.

If you want to focus on content rather than server administration, the CLIQHOST team is here to help. Explore our NVMe VPS plans for maximum performance, check out our managed dedicated servers for hands-off infrastructure, or visit the CLIQHOST blog for more technical guides.

SHARE
// what clients say

What Our Clients Say

Real reviews from customers who trust CLIQHOST for performance, reliability and expert technical support.

★★★★★

"We moved our online shop from a foreign host and the difference is night and day — pages load instantly and support replies in minutes, in Romanian."

AM
Andrei M.
eCommerce owner · Chișinău
★★★★★

"Migrated 12 client sites to CLIQHOST. Free migration, zero downtime, and the cPanel setup is exactly what my team needed. Highly recommend."

EV
Elena V.
Web agency · Bălți
★★★★★

"Our NVMe VPS handles traffic spikes without a sweat. Full root, local datacenter, and billing in MDL — everything we wanted from a provider."

DC
Dmitri C.
SaaS founder · Chișinău