Skip to content
Drop-in replacement for the WordPress wpdb class that uses PostgreSQL instead of MySQL — makes full WP sites run on Post...

2023 · Creator & Maintainer

WP PostgreSQL Database

Drop-in replacement for the WordPress wpdb class that uses PostgreSQL instead of MySQL — makes full WP sites run on Postgres.

The challenge

WordPress is hard-wired to MySQL via the wpdb class. Teams forced onto PostgreSQL (compliance, ops consolidation) have had to fork core or maintain heavy plugins riddled with SQL dialect bugs.

The result

A drop-in wpdb replacement that translates WP's SQL surface to PostgreSQL — plugins keep working unchanged, ops gets a single Postgres instance, and dialect quirks live in one place instead of every query.

Year
2023
Role
Creator & Maintainer
Stack
4 teches
Status
Published

Overview

WordPress ships with MySQL/MariaDB as its only officially supported database. WP PostgreSQL Database is a wpdb drop-in that translates WordPress's MySQL-flavoured queries to PostgreSQL-compatible SQL at runtime.

Why It Matters

If you're already running a Postgres-heavy infrastructure (or want pgvector, better JSON support, or row-level security) this drop-in lets you run WordPress without introducing a separate MySQL server.

Current Status

Experimental but fully functional for core WP and most popular plugins. WooCommerce support is in progress.

Tech

PHP, WordPress wpdb, PDO, PostgreSQL SQL dialect translation.

Share
𝕏 in

Related work

Building something similar?

Let's talk about your project.

Open to freelance engagements and consulting on Laravel, WordPress, and AI-powered systems.