WordPress Database Abstraction

WordPress Database Abstraction

full database abstraction layer, replace backend database

I would love for there to be an option to “flatten the database schema” or even better, to completely replace the wp_postmeta table with a NoSQL or similar solution. While I am not certain, I believe that now this may be possible within MySQL-MariaDB and their NoSQL capabilities. “Meta-tables” can really become a bottleneck on large and busy websites. That’s why I’m aware that there are plugins available for WooCommerce that create separate “flattened” tables to speed up operations.

Still Under Development

Database: SQLite

The latest development in database engine is the Performance Lab plugin, which offers SQLite integration to use an SQLite database instead of MySQL.

This is particularly interesting because it is now being pushed due to the desire to run the entire WordPress in the browser using WebAssembly, for example on cloud edge instances. PHP is already capable of running as a WebAssembly binary, see here and they also need a database that can run in WebAssembly, which can only be achieved with SQLite. The entire experimental but official project is called WordPress Playground.

Database: Microsoft SQL Server

Project Nami is a WordPress solution powered by Microsoft SQL Server and is designed for deployment on Azure. It is actively developed and can be found on the ProjectNami/projectnami repository.

Database: PostgreSQL

While there are plugins available to use PostgreSQL with WordPress, such as PG4WP and WPPG, they aren’t always reliable. However, I’ll list them here as possible solutions.

The original PG4WP plugin has been abandoned, but a forked version can be found at kevinoid/postgresql-for-wordpress that still works.

Another plugin option is WPPG, which can be found on the qodrorid/wppg repository and it may even be faster than the PG4WP plugin.

A few Abandoned Options

WP DB Driver was improved database layer to choose from PDO-MySQLi-MySQL database drivers, but it is abandoned long ago.

WP DB Abstraction was PDO oriented that included SQL Server, but unmaintained long time ago.

There were multiple SQLite integration and just one ended up in official project. The one that were developed in the past were:

The SQLite Integration plugin was a PDO integration and I found out that a plugin officially used today originared from this project. The PDO (SQLite) For WordPress plugin was another one, but it is also unmaintained and probably an ancestor of the SQLite Integration plugin.

What about NoSQL, for example Mongo?

The only real effort was just mentioned here with references to this abandoned code virtimus/mysql2mongo.

There once existed Mongopress but it was long abandoned.


alleyinteractive/es-wp-query: A drop-in replacement for WP_Query to leverage Elasticsearch for complex queries alleyinteractive/searchpress: Elasticsearch integration for WordPress.

date 21. Dec 2016 | modified 29. Dec 2023
filename: Plugins » Database & SQL » Database Abstraction