Support » Installing WordPress » Configuring WordPress with PostgreSQL

  • Hello everyone!

    I have installed WordPress 6.4.1 with LAMP on CentOS 9 and everything works correctly, however, what I need is for WordPress to use PostgreSQL as Database Management System. I have tried the wppg plugin and pg4wp, but they did not give me any results. When I type “localhost” in my browser, I get the error “Error establishing a connection to the database” and when I go to localhost/wp-admin I also get “This means that the username and password information in your wp-config.php file is incorrect or that the database server on localhost could not be contacted. This could mean that the database server on your host is down.”

    No matter how much I look for configurations, restart apache, php or postgres, it does not recognize the database even if the data in the wp-config.php file is correct.I do not know if you can help me with this, please.

    It is not superfluous to add that in my system I have the following:

    centos-logos-httpd.noarch 90.4-1.el9 @appstream
    httpd.x86_64 2.4.57-5.el9 @appstream
    httpd-core.x86_64 2.4.57-5.el9 @appstream
    httpd-filesystem.noarch 2.4.57-5.el9 @appstream
    httpd-tools.x86_64 2.4.57-5.el9 @appstream

    mysql-selinux.noarch 1.0.5-1.el9 @appstream
    php-mysqlnd.x86_64 8.0.30-1.el9 @appstream

    mariadb.x86_64 3:10.5.16-2.el9 @appstream
    mariadb-backup.x86_64 3:10.5.16-2.el9 @appstream
    mariadb-common.x86_64 3:10.5.16-2.el9 @appstream
    mariadb-connector-c.x86_64 3.2.6-1.el9 @appstream
    mariadb-connector-c-config.noarch 3.2.6-1.el9 @appstream
    mariadb-errmsg.x86_64 3:10.5.16-2.el9 @appstream
    mariadb-gssapi-server.x86_64 3:10.5.16-2.el9 @appstream
    mariadb-server.x86_64 3:10.5.16-2.el9 @appstream
    mariadb-server-utils.x86_64 3:10.5.16-2.el9 @appstream

    php.x86_64 8.0.30-1.el9 @appstream
    php-cli.x86_64 8.0.30-1.el9 @appstream
    php-common.x86_64 8.0.30-1.el9 @appstream
    php-fpm.x86_64 8.0.30-1.el9 @appstream
    php-gd.x86_64 8.0.30-1.el9 @appstream
    php-mbstring.x86_64 8.0.30-1.el9 @appstream
    php-mysqlnd.x86_64 8.0.30-1.el9 @appstream
    php-opcache.x86_64 8.0.30-1.el9 @appstream
    php-pdo.x86_64 8.0.30-1.el9 @appstream
    php-pgsql.x86_64 8.0.30-1.el9 @appstream
    php-xml.x86_64 8.0.30-1.el9 @appstream

    postgresql.x86_64 13.11-1.el9 @appstream
    postgresql-contrib.x86_64 13.11-1.el9 @appstream
    postgresql-private-libs.x86_64 13.11-1.el9 @appstream
    postgresql-server.x86_64 13.11-1.el9 @appstream

    Thanks in advance and best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Unless you can find a working plugin (which, as you’ve seen are not exactly common) you can’t run WordPress on PostgreSQL or any other database system. It’s MySQL And MariaDB only.

    At this point WPPG is the only one that’s available on here, so if you can try and ask in it’s support forum, but seeing as how it was last updated over 6 years ago, I highly doubt that you’ll get any responses.

    As a question, why does it have to be PostgreSQL and why can’t you run MySQL/MariaDB?

    Thread Starter cesarchameleon

    (@cesarchameleon)

    It has to be PostgreSQL because it is a task of my job. I have a few colleagues trying the same thing and no one has been able to do it.

    I have a few colleagues trying the same thing and no one has been able to do it.

    Yep, that’s what I’d expect. WordPress is just not built to allow you to plug in different database systems like some other CMS’s are, so it’s something that is very much most likely not possible.

    Good luck with it. If you can do it you’ll be one of the first in the world to actually make it work and I’m sure there’d be a lot of people that would like to find out how.

    Thread Starter cesarchameleon

    (@cesarchameleon)

    Thank you very much!

    mattbucci

    (@mattbucci)

    Take a look at https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress I have made a lot of progress on it in the last few months.

    This isn’t that crazy of an idea, there are even wordpress SQLITE dropins https://ww.wp.xz.cn/plugins/sqlite-database-integration/

    • This reply was modified 1 week ago by mattbucci.
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.