How to Install Joomla with PostgreSQL and Nginx on Ubuntu 24.04 LTS

Whether you’re a beginner or a professional looking for a CMS (content management system) to quickly and easily set up a new website, Joomla is the ideal solution for your needs.

Joomla is an open-source and free forever CMS, written in PHP, and supports MySQL/MariaDB and PostgreSQL as a backend. You don’t need coding knowledge to host your website with Joomla.

With Joomla, you can create stunning corporate websites or portals, online applications, small business websites, online magazines, newspapers, and publications, e-commerce and online reservations, and government, and non-profit websites or portals. Joomla powers nearly 2 million active websites around the world.

Some of the key features

  • Build in SEO support
  • Multilingual functionality
  • Text filtering
  • Custom fields
  • Build in SMTP and caching support
  • Modules
  • Access Control Lists (ACL)

In this tutorial, you will learn how to install Joomla with Nginx on Ubuntu 24.04 LTS.

Prerequisites

  • A system running Ubuntu 24.04
  • A sudo user or root password configured

Step 1: System Update

Before starting the installation, it is recommended to update the Ubuntu base system by executing the below command:

Step 2: Install Nginx

Now, install the nginx web server using the command below:

Next, start the Nginx service, enable it at system boot time, and check the status of Nginx using the below commands:

After installing and ensuring the web server is running, proceed to the next step.

Step 3: Install PHP and PHP-FPM

In this article, we are going to install Joomla 5, hence we are going to install the recommended PHP 8.3 with the necessary PHP modules by running the following command:

Next, check php8.3-fpm service status and enable it at system reboot by running the following command:

Step 4: Install and Configure PostgreSQL for Joomla

With Joomla 5 PostgreSQL 16.0 is recommended, execute the below command to install the latest PostgreSQL.

Once, the database is installed, check the PostgreSQL service status, and enable the service at system startup.

Next, you need to configure the database for Joomla, to do so run the below command in the terminal:

Once, you execute the above command, you will be logged into the PostgreSQL shell. Create a Joomla database and user with the required permission by running the command below:

Output:

Step 5: Download and Install Joomla CMS

Once, the database is configured, download the latest Joomla CMS by running the following command:

Once the package is downloaded, unzip that zip file in the Nginx root directory.

Now, change the owner and permission of the Joomla directory as shown in the command below:

Step 6: Configure Nginx Virtual Host for Joomla

Create a new Nginx configuration file for Joomla by executing the command below:

Paste the following lines in it.

server {
    listen 80;
    server_name example.com; # Set your domain name/IP address

    root /var/www/html/joomla;  # Your Joomla installation directory path

    index index.php index.html index.htm;

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

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;  # Adjust PHP-FPM version if necessary
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

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

Note: you need to replace example.com with your domain name/IP address in the above code.

Once you are done with editing, save and close the file.

Next, create a symlink of joomla.conf file by running the following command:

Test the configuration by running the following command:

Output:

To apply the changes, restart the Nginx web server.

Step 7: Access Joomla CMS Website

Open your web browser and enter the domain or IP address you configured in the Nginx configuration file.

In our example, it is http://example.com. You will see ‘Select Installation Language‘ page as shown below:

Select your language, then Set up your Joomla site name and click on the “Setup Login Data” button. You will see the below page:

Here, setup your admin username and password and email ID and click on “Setup Database Connection” button. You will see the below page:

Enter the database type as PostgreSQL (PDO), Enter your hostname, your database username, and your database Password, which you have configured easily, and then click on the  “Install Joomla”  button.

After Joomla is installed, you will see the following page.

Click on “Open Administrator” to access the Joomla login page.

Enter your admin username and password, then click the login button. The next page will display the Joomla Dashboard.

On the Joomla Dashboard, you can customize according to your needs.

Conclusion

Joomla offers great flexibility by providing a range of customization options. Remember to keep Joomla updated for more features, better performance, and security. Feel free to ask if you have any questions.

Leave a Reply

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