How to install and enable PostgreSQL server in Plesk




  • Avatar
    Vivo forta (Edited )

    This procedure has installed PostgreSQL 9.2 on Plesk onyx with centOS 7.3
    How to install PostgreSQL 9.5 or 9.6?

  • Avatar
    Bulat Tsydenov

    @Vivo, PostgreSQL is installed from the repositories enabled on the server. You can enable any other repository which provides the required version of PostgreSQL and install it the same way.

  • Avatar
    Vitaly Zhidkov

    @Vivo, you should enable a corresponding repo for it. Check their list at

  • Avatar

    Can someone please tell me how to add PostgreSQL 9.5 repo so i get 9.5 when i install in Plesk GUI?

  • Avatar
    Ivan Postnikov



    Use the following instructions: for Debian, for CentOS.
    In case of any issues regarding setting the PostreSQL, contact support.

  • Avatar
    Ashkan Nasiri

    This file doesn't exist:


    or /opt/psa directory in first place.

  • Avatar
    Ivan Postnikov


    As it is written in the article, /opt/psa/admin/bin/pg_manage is a symbolic link to /usr/local/psa/admin/sbin/wrapper. It may be recreated using the command:

    ln -s /usr/local/psa/admin/sbin/wrapper /opt/psa/admin/bin/pg_manage

    Have you tried this command?

    What version of Plesk is installed?

  • Avatar
    Ashkan Nasiri

    We have already ran the ln command but since the file didn't exist we got error. here is the result:

    ln: failed to create symbolic link ‘/opt/psa/admin/bin/pg_manage’: No such file or directory 


    We have latest plesk onyx version. It's a fresh installation of plesk.

  • Avatar
    Alexandr Tumanov

    @Ashkan, I've made some corrections to the article. Please check. The path was Ubuntu specific, now it is for all OSes. 

  • Avatar
    Plesk User (Edited )

    It took me 3 days to research and find all these information, so here it's in case you are pulling your hairs.

    How to successfully install PostgreSQL 11 on Plesk (CentOS 7 version):

    1- install PostgreSQL new REPO via SSH:
    rpm -Uvh

    2- Enable PostgreSQL from Plesk > Tools & Settings > Updates and Upgrades > Add/Remove components:

    3- Install version 11:
    yum install postgresql11-server postgresql11 postgresql11-libs postgresql11-devel

    4- make a symbolic link from 11 to no version:
    ln -s /lib/systemd/system/postgresql-11.service /lib/systemd/system/postgresql.service

    5- Copy ver 11 over 9.2:
    cd /usr/pgsql-11/bin/
    for f in *; do echo $f; [ -e /usr/bin/$f ] && mv /usr/bin/$f /usr/bin/$f.old92; ln -s $(pwd)/$f /usr/bin/$f; done

    6- Setup the Database Server:
    /usr/pgsql-11/bin/postgresql-11-setup initdb

    7- Move old data directory and Symbolic Link New Ones:
    cd /var/lib/pgsql
    mv data data.old92
    mv backups backups.old92
    ln -s 11/backups; ln -s 11/data

    8- Start the server:
    systemctl start postgresql.service

    9- Link to Plesk Management:
    rm /usr/local/psa/admin/bin/pg_manage
    ln -s /usr/local/psa/admin/sbin/wrapper /usr/local/psa/admin/bin/pg_manage

    10- Go to Plesk: Tools & Settings > Database Servers

    11- Add a PostgreSQL database server and enter user and password as described above.

    12- You should see a Green checkmark near PostgreSQL name on Tools & Settings > Database Servers.


  • Avatar
    Alisa Kasyanova

    @Plesk User
    As per our documentation here , Plesk now supports PostgreSQL 8.4–9.5.
    So please notice that your manual (thank you for sharing it!) should be used on own will and risk, and if any issues occur, it would be an unsupported case.

  • Avatar

    @Alisa Kasyanova 

    I run Plesk Onyx Version 17.8.11 on Debian 9.9 and i got PostgreSQL 9.6.12 by default when adding as described in docs.

    Does this mean that my PostgreSQL 9.6.12 is not supported?

  • Avatar
    Nick Plekhov

    Hello @Peter.

    Thank you for bringing our attention to this matter.
    Indeed according to the Plesk release notes PostgreSQL 9.6 is not supported and exactly this version is installed on Plesk 17.8 with underlying Debian 9.9.
    I have passed this question to our development team for further clarifications.

    I will update you as soon as I get a word from them.

Please sign in to leave a comment.

Have more questions? Submit a request