This article will help you to install and Integrate PostgreSql with XAMPP for practicality use:
- Download the PostgreSQL installer from EnterpriseDB and follow the instruction.
- Assuming your XAMPP is located in D:\XAMPP; so better locate your PostgreSQL in the same folder, sample: D:\XAMPP\PostgreSQL\12.
- Uncomment below lines in php.ini (usually located in D:\XAMPP\php\php.ini):
From:
;extension=pdo_pgsql
;extension=pgsql
To:
extension=pdo_pgsql
extension=pgsql - Stop and Start (Restart) your Apache module in XAMPP Control Panel:

- Try opening it with pgAdmin to make sure your PostgreSQL database is working:

- You are ready to use PostgreSQL with your PHP code.