Title: PostgreSQL database connection issue
Last modified: August 20, 2016

---

# PostgreSQL database connection issue

 *  [mcclells](https://wordpress.org/support/users/mcclells/)
 * (@mcclells)
 * [14 years ago](https://wordpress.org/support/topic/postgresql-database-connection-issue/)
 * I obtained a database through my school, and I have the port number (though I’m
   not sure where that’s needed on the wp-config file, if at all), database name,
   username, password, and host. I have been given a PostgreSQL account with these,
   as that is what is supported at my school. I was given this link for a PG4WP 
   plugin and I followed the install instructions:
 * [http://wordpress.org/extend/plugins/postgresql-for-wordpress/installation/](http://wordpress.org/extend/plugins/postgresql-for-wordpress/installation/)
 * I originally was using WP 3.3.2, but I kept getting this error: “Error establishing
   a database connection.” I went & downloaded 3.2.1, as the plugin said that was
   the latest compatible version, figuring it was that. It wasn’t. I’ve keyed in
   all information correctly on the wp-config file (I manually tried to do it after
   the 5 minute install wasn’t working), and I’m still getting this database connection
   error. I’m thinking something went wrong with the PG4WP plugin, but I followed
   the directions and I’m not sure what I’m doing wrong/where to go from here.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [I Dont use this account Anymore why is it still here](https://wordpress.org/support/users/mattyrasker/)
 * (@mattyrasker)
 * [14 years ago](https://wordpress.org/support/topic/postgresql-database-connection-issue/#post-2780946)
 * That error message sure points to an issue with your wp-config file, at least
   thats what it normally is.
 * You say you obtained a database through your school and was given a port numbers,
   are you installing WordPress on the same box as where your database is installed,
   or on a different box?
 * If your username and password are definately correct, then perhaps the host is
   wrong. Normally it is ‘localhost’ if WordPress is being installed on the same
   box.
 * In most cases, you would only need a port number if going through a proxy or 
   a firewall of some kind.
 *  [I Dont use this account Anymore why is it still here](https://wordpress.org/support/users/mattyrasker/)
 * (@mattyrasker)
 * [14 years ago](https://wordpress.org/support/topic/postgresql-database-connection-issue/#post-2780947)
 * Also, everything I see to do with getting PostgreSQL working on WordPress points
   to that plugin, so that looks to be the way round it, but I’ve not set it up 
   to work with postgreSQL so I can’t be sure of its installation.
 *  [hawk__](https://wordpress.org/support/users/hawk_/)
 * (@hawk_)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/postgresql-database-connection-issue/#post-2781186)
 * I didn’t notice your question before because you didn’t post it in PG4WP support
   forum ([http://wordpress.org/extend/plugins/postgresql-for-wordpress/support/](http://wordpress.org/extend/plugins/postgresql-for-wordpress/support/)).
 * The possibility to specify the port on which to connect for the database has 
   been integrated in PG4WP 1.3.0 (released today).
 * You should upgrade your PG4WP and then you can set the port in the hostname for
   database connection in WordPress configuration page :
    `HOSTNAMEorIP:PORT` eg`
   localhost:3128`
 * PG4WP officially supports WordPress 3.4 and PostgreSQL 9.1+, don’t hesitate to
   report any problem.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PostgreSQL database connection issue’ is closed to new replies.

## Tags

 * [database connection](https://wordpress.org/support/topic-tag/database-connection/)
 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [PostgreSQL](https://wordpress.org/support/topic-tag/postgresql/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 3 replies
 * 3 participants
 * Last reply from: [hawk__](https://wordpress.org/support/users/hawk_/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/postgresql-database-connection-issue/#post-2781186)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
