Using Postgresql with Laragon

  • | 496 points

  • | 496 points

    I found the tutorial "How to add another PostgreSQL version a bit misleading. It's true that when I downloaded PostgreSQL and pasted the extracted files into the appropriate folder in Laragon 4.x, it appeared to start up with Apache and MySQL as expected, but I couldn't open the database from within Laragon because the postgres role did not exist and I couldn't start PGAdmin 4 from within Laragon.

    I think an easier route is to install PostgreSQL separately (e.g. from along with PGAdmin 4, then all you need to do in Laragon is enable the PostgreSQL drivers for PHP.

    From the Menu, go to PHP->extensions and enable pdo_pgsql and pgsql. Your Laravel apps will then be able to connect to PostgreSQL databases. Obviously, you will have to start up and shut down the PostgreSQL local server separately from Laragon but the Windows installer sets up PostgreSQL as a service anyway so that's not difficult.

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.