Joomla is a powerful and flexible open-source CMS, perfect for corporate websites, portals, and e-commerce. In this guide, you’ll learn how to manually install Joomla on a VPS with Ubuntu using the LAMP or LEMP stack.
Keep a backup and console access before making changes. Replace example addresses and paths and test commands on a staging system.
Step 1. Prepare the Server
Update your VPS to the latest version:
sudo apt update && sudo apt upgrade -y
Step 2. Install LAMP or LEMP Stack
For LAMP (Apache):
sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php php-cli php-curl php-xml php-mbstring unzip -y
For LEMP (Nginx):
sudo apt install nginx mysql-server php-fpm php-mysql php-cli php-curl php-xml php-mbstring unzip -y
Step 3. Create a Database
sudo mysql -u root -p
CREATE DATABASE joomla;
CREATE USER 'joomlauser'@'localhost' IDENTIFIED BY 'securepass';
GRANT ALL PRIVILEGES ON joomla.* TO 'joomlauser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 4. Download and Extract Joomla
# Download a supported Full Package ZIP from https://downloads.joomla.org/
# Upload it as /root/joomla.zip before continuing.
sudo mkdir -p /var/www/joomla
sudo unzip /root/joomla.zip -d /var/www/joomla
sudo chown -R www-data:www-data /var/www/joomla
sudo find /var/www/joomla -type d -exec chmod 755 {} +
sudo find /var/www/joomla -type f -exec chmod 644 {} +
Step 5. Configure Virtual Host
Apache:
sudo nano /etc/apache2/sites-available/joomla.conf
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/joomla
<Directory /var/www/joomla>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
sudo a2ensite joomla
sudo a2enmod rewrite
sudo apache2ctl configtest
sudo systemctl reload apache2
Step 6. Install via Browser
Open your server's IP or domain in a browser and follow the Joomla installer:
- Enter the site name
- Create admin user and set a password
- Enter database connection details
- Complete setup and delete the
installationfolder
Tips from Bit.Hosting
- Set up SSL certificate with Let's Encrypt
- Keep Joomla and extensions updated regularly
- Protect the admin panel with.htaccess
- Use backup tools like Akeeba Backup
- Optimize performance with cache and Gzip
← Back to “CMS and Websites” section
If you face any issues installing Joomla — contact Bit.Hosting support. We’ll help you get everything set up! ✨
← CMS and Websites on VPS