Feature #614
Adding PostgreSQL Support to WordPress
Description
This is a guide for adding support for the PostgreSQL database server to WordPress (since there is currently no native support for it). This is has been tested on a migrated WordPress website on Debian LAMP stack over to a FreeBSD Nginx, PostgreSQL web server stack. The migration is outside of the scope of this guide, however is covered in Issue #609
Prepare the Environment¶
- Install the php5 postgres package:
apt-get install php5-pgsql
Install PG4WP¶
- Download the PG4WP plugin
wget https://downloads.wordpress.org/plugin/postgresql-for-wordpress.1.3.1.zip
- Unzip the plugin:
cd ~ unzip postgresql-for-wordpress.1.3.1.zip
- Copy the plugin to the wordpress site content folder:
cp -r postgresql-for-wordpress/pg4wp /var/www/www.example.net/wp-content/
- Change the ownership of the file to the web server user:
chown -R www-data:www-data /var/www/www.example.com
- Now edit the main wordpress config:
nano /var/www/www.example.com/wp-config.php
- And change the
define('DB_HOST', 'mysql.example.com');
to the postgresql server:define('DB_HOST', 'pgsql.example.com');
- And change the
Resources¶
Updated by Daniel Curtis over 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100