close

WordPress feature plugin · SQLite-backed database layer

WordPress without a database server.

SQLite Database Integration lets WordPress run on a local SQLite database while core, plugins, and themes keep using the familiar $wpdb APIs. It powers WordPress Playground's in-browser WordPress runtime and gives the broader ecosystem a feature plugin for testing SQLite support.

Need more parser throughput? The optional Native PHP extension accelerates the MySQL parser hot path while keeping the plugin pure PHP by default.

Why SQLite for WordPress?

Fewer moving parts

SQLite keeps the database next to the site. That makes demos, tests, previews, and small environments easier to package and reset.

Same WordPress APIs

Code keeps calling $wpdb, core APIs, and normal plugin hooks. The database layer adapts the SQL underneath.

A path to core feedback

This feature plugin is a place to test compatibility, report edge cases, and improve SQLite support with real WordPress workloads.

Try the programming model

The important promise is boring in the best way: use WordPress the way you already do. This runnable example creates a custom table, writes rows with $wpdb->insert(), and reads them back.

Click Run to execute it in WordPress Playground. Playground already runs WordPress on this SQLite database layer; the first run downloads the runtime, and later snippets on the page reuse it.

Dev note: the snippet intentionally uses MySQL-style DDL. The SQLite database layer handles translation so plugin code can stay close to normal WordPress conventions. For higher-throughput parsing, see the optional Native PHP extension.

How it fits together

1

WordPress calls $wpdb

Core, plugins, and themes issue familiar WordPress database calls.

2

The drop-in intercepts queries

The plugin replaces the database drop-in so requests flow through the SQLite driver.

3

MySQL SQL is translated

The lexer, parser, and emulation layer adapt MySQL syntax and behavior to SQLite.

4

SQLite stores the data

The site runs against an embedded database file instead of an external MySQL server.

Go deeper

Native PHP extension

For hosts that can load extensions, wp_mysql_parser accelerates the parser hot path. It is optional.

Contribute

The project is part of the WordPress performance work. Code, tests, docs, and real-world feedback are all useful.