Project

General

Profile

Feature #614

Adding PostgreSQL Support to WordPress

Added by Daniel Curtis over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database Server
Target version:
Start date:
05/04/2015
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

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');
      

Resources

#1

Updated by Daniel Curtis over 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
#2

Updated by Daniel Curtis over 9 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF