Note:- Already assume that you have installed xampp on your system. Also proceed next step further to install postgresql & phppgadmin in xampp.
1. Download PostgreSql & PhpPgAdmin
– Download the postgresql installer from here and run it.
– Set the installation path to C:\Xampp\PostgreSQL\16
(the pgsql folder will need to be created, the folder named 16
needs to be created, I named it like that based on the current postgres version).
– Download the phppgadmin repository (Code -> Download ZIP).
– Extract zip folder and paste in path C:\Xampp\phpPgAdmin
2. Modify Php.ini File
– Navigate to C:\Xampp\php
and open php.ini
with an editor like VSCode or Notepad++.
– Uncomment (by removing the preceding ;
) the lines extension=pgsql
, extension=pdo_pgsql
& save the file.
3. Modify PhpPgAdmin Config file
– Go to C:\Xampp\phpPgAdmin\conf
and rename config.inc.php-dist
to config.inc.php
.
– Open config.inc.php
with an editor like VSCode or Notepad++.
– Change the line $conf['servers'][0]['host'] = '';
to $conf['servers'][0]['host'] = 'localhost';
.
– Change the lines $conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
and $conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
to $conf['servers'][0]['pg_dump_path'] = 'C:\\Xampp\\PostgreSQL\\16\\bin\\pg_dump.exe';
and $conf['servers'][0]['pg_dump_path'] = 'C:\\Xampp\\PostgreSQL\\16\\bin\\pg_dumpall.exe';
& save the file.
4. Modify Xampp Config File
Please find httpd-xampp.conf
file as given path C:\Xampp\apache\conf\extra
& open in editor add below snippet before the line <IfModule alias_module>
then save the file.
Alias /phppgadmin "C:/Xampp/phpPgAdmin"
<Directory "C:/Xampp/phpPgAdmin">
AllowOverride AuthConfig
Require all granted
</Directory>
5. Restart Apache & Postgresql Service
– Check the url link:- http://localhost/phppgadmin/
– Click on postgresql server in sidebar then login with your credential it’s working fine now as below Snapshot.