Feature Plugin to add SQLite support to WordPress. Under Development.
Feature Plugin to add SQLite support to WordPress. Under Development.
This project implements SQLite database support for MySQL-based projects.
It is a monorepo that includes the following components:
The monorepo packages are placed under the packages directory.
The WordPress plugin links the MySQL on SQLite package using a symlink. The build script replaces the symlink with a copy of the package for release.
The codebase is pure PHP with zero dependencies. It supports PHP 7.2 through 8.5, MySQL syntax from version 5.7 onward, and requires SQLite 3.37.0 or newer (with legacy mode down to 3.27.0).
The codebase is written in PHP and Composer is used to manage the project. The following commands are useful for development and testing:
…The default code path is pure PHP. For environments that can load PHP extensions, the optional wp_mysql_parser extension accelerates the MySQL lexer/parser used by MySQL on SQLite.
Latest local measurement (Apple Silicon macOS, PHP 8.4.5 CLI, 2026-05-26): the native lexer path processed the MySQL test corpus at ~343k QPS versus ~72k QPS for pure PHP (~4.80x), and the native parser path processed it at ~108k QPS versus ~7k QPS for pure PHP (~15.45x).
Release is streamlined with a local preparation script and GitHub Actions:
Run the release preparation script locally.
composer run prepare-release The script will:
release/v branch with a preparation commit.Review the PR. Edit the changelog or push additional changes to the release branch.
Mark as ready and merge the PR.
The release-publish workflow will automatically:
The project consists of multiple components providing different APIs that funnel into MySQL on SQLite to support diverse use cases both inside and outside the PHP ecosystem.
The following diagrams show how different types of applications can be supported using components from this project:
…The following diagram illustrates how a MySQL query is processed and emulated:
string tokens AST ╔═════════════╗ SQL
┌─────────────┐ │ ╔═══════╗ │ ╔════════╗ │ ║ Translation ║ │ ┌────────┐
│ MySQL query │──┴─→║ Lexer ║──┴─→║ Parser ║──┴─→║ & ║──┴─→│ SQLite │
└─────────────┘ ╚═══════╝ ╚════════╝ ║ Emulation ║ └────────┘
╚═════════════╝No open issues yet, or sync has not completed.