If you want to develop or test Joomla using PostgreSQL instead of MySQL or MariaDB, and you're using Laragon as your local development environment, the good news is that it is remarkably easy to set up.
Laragon can install and manage PostgreSQL alongside the other services in your local development environment, so there is no need to create a separate PostgreSQL setup.
In fact, once PostgreSQL is installed, there are only a couple of small things you need to do before you can install Joomla and start testing it with PostgreSQL.
This tutorial shows you how to set up PostgreSQL in Laragon and highlights a couple of differences you'll encounter when using PostgreSQL, particularly if you're used to working with MySQL or MariaDB.
This tutorial assumes that you already have Laragon installed and working on Windows.
Which version of PostgreSQL should you install?
At the time of writing, Laragon's Quick add offers these PostgreSQL versions:
- PostgreSQL 18.2
- PostgreSQL 18.0
- PostgreSQL 17.2
- PostgreSQL 16.6
- PostgreSQL 15.10
If you simply want the most recent version already available in Laragon, I recommend PostgreSQL 18.2.
However, there is an important distinction between the latest version offered by Laragon and the latest PostgreSQL release.
PostgreSQL 18.6 is now the current PostgreSQL 18 release. If you want to use the latest PostgreSQL release, you can add it to Laragon's Quick add configuration yourself. This is the same approach described in my earlier tutorial about adding MariaDB to Laragon. PostgreSQL recommends using the latest minor release for your chosen major version.
Once you have added the new PostgreSQL version to the Quick add configuration, it will appear alongside the existing versions and you can install it using exactly the same Quick add process.
This is preferable to manually installing PostgreSQL because you still let Laragon manage the installation and keep the database server within your Laragon environment.
Adding PostgreSQL to Laragon
Start Laragon in the usual way.
Open the Laragon menu and select:
Menu > Tools > Quick add > PostgreSQL
Select the PostgreSQL version you want to install.
If you have added a newer version to the Quick add configuration, it will appear in this list too.
Laragon will download the PostgreSQL package and install it into your Laragon environment.
There is no separate PostgreSQL installer to run and no need to create a Windows service. Laragon manages its own services.
Starting PostgreSQL
Once PostgreSQL has been added, you can start it from Laragon.
Open:
Menu > PostgreSQL > Start
Alternatively, if you normally start all your Laragon services together, click Start All.
PostgreSQL normally listens on port 5432, which is the standard PostgreSQL port.
You can check the Laragon window to confirm that PostgreSQL is running.
Checking that PostgreSQL is working
Right-click the Laragon control window to open the menu, then select:
Menu > Terminal
Then run:
psql --version
You should see something similar to:
psql (PostgreSQL) 18.2
You can also connect to PostgreSQL from the terminal:
psql -U postgres
If prompted for a password, enter the password for your PostgreSQL postgres user.
If the connection succeeds, you will see:
postgres=#
You can leave the PostgreSQL command prompt with:
\q
Connecting to PostgreSQL with HeidiSQL
If you already use HeidiSQL to manage your MySQL or MariaDB databases, you can also use it with PostgreSQL.
However, there is an important difference in the way you connect.
With MySQL or MariaDB, you normally connect to the server. Once connected, HeidiSQL can show you the databases available on that server.
The important difference with PostgreSQL is that a client connection is made to a specific database within the PostgreSQL server, rather than connecting to the server and then selecting from all databases.
For example, you might configure your HeidiSQL connection using:
Network type: PostgreSQL (TCP/IP)
Hostname: localhost
Port: 5432
User: postgres
Password: your PostgreSQL password
Database: postgres
The postgres value in the Database field is important.
A PostgreSQL connection is always associated with a database. A default PostgreSQL installation normally provides a database called postgres, so this is a convenient database to use when first connecting.
Once connected, HeidiSQL will show you the objects belonging to that database.
This can initially seem strange if you are used to MySQL or MariaDB, where you connect to the server and then browse the databases available on that server.
Connecting to a different PostgreSQL database
Suppose you create a database called:
joomla
You would create a HeidiSQL connection specifying:
Database: joomla
You are therefore connecting directly to the joomla database.
If you want to work with another database, you can create another HeidiSQL session for that database.
This is one of the differences between PostgreSQL and MySQL/MariaDB that is worth understanding when you first start using PostgreSQL. It isn't a problem with HeidiSQL; it is simply a difference in the database connection model.
Using PostgreSQL with PHP
Installing PostgreSQL is only one part of the setup.
The PHP installation included with Laragon may not have the PostgreSQL extension enabled. You can enable it directly from the Laragon control panel.
Right-click the Laragon control panel and select:
PHP > Extensions
This displays a list of the available PHP extensions. Extensions that are already enabled are marked with a tick.
Find pdo_pgsql in the list and click it to enable the extension.
As soon as you enable it, Laragon will display a message that Apache has been reloaded.
Once Apache has reloaded, PHP will have PostgreSQL support enabled for applications that use PDO.
Using PostgreSQL with Joomla
If you're setting up PostgreSQL because you want to develop a Joomla site using PostgreSQL, then you should now be ready to install Joomla using PostgreSQL instead of MySQL or MariaDB.
Now that PostgreSQL is running and pdo_pgsql is enabled, the Joomla installer should offer PostgreSQL as a database option.
Your connection details will typically look something like this:
Database Type:
PostgreSQL
Host: localhost
Port: 5432
Username: postgres
Password: your PostgreSQL password
Database Name: joomla
Conclusion
Setting up PostgreSQL in Laragon is straightforward.
Choose Quick add, select PostgreSQL, and let Laragon download and install it. If you want a PostgreSQL version newer than the one currently offered by Quick add, add the new version to Laragon's Quick add configuration using the same method described in my MariaDB tutorial. It will then become just another option in Quick add.
The one thing that can catch out people coming from MySQL or MariaDB is the way database connections work in HeidiSQL. With MySQL and MariaDB you connect to the server and then browse the databases on that server. With PostgreSQL, the connection is made to a specific database.
Once you know that, PostgreSQL fits quite happily alongside MySQL and MariaDB in your Laragon development environment.



Congratulations, you discovered a hidden secret!