5,000+
October 21, 2026
January 17, 2023
Run WordPress on SQLite.
The SQLite plugin is a community, feature plugin. The intent is to allow testing an SQLite integration with WordPress and gather feedback, with the goal of eventually landing it in WordPress core.
The plugin replaces the default MySQL database layer with an SQLite-backed implementation. WordPress continues to use its standard wpdb API while the plugin translates and emulates MySQL queries for SQLite.
Important: Enabling SQLite creates a separate, empty database; it does not migrate an existing site. If you enable it on a site that uses MySQL or MariaDB, WordPress will ask you to set up the site again. Disabling the plugin reconnects WordPress to the previous database with its data unchanged. Changes made while using SQLite are not transferred.
The plugin requires the PDO SQLite PHP extension and SQLite 3.37.0 or newer.
No installation instructions provided.
The primary purpose of the plugin is to test WordPress with SQLite and gather feedback, with the goal of eventually including the integration in WordPress core.
Read the original proposal on the Make WordPress Core blog and the call for testing for more context.
Yes, but keep reliable backups and make sure SQLite is a good fit for your site’s traffic. SQLite supports concurrent reads but allows only one writer at a time, so MySQL or MariaDB may be a better fit for sites with heavy concurrent write traffic. Test your workload, themes, and plugins before switching.
No. Enabling SQLite starts a fresh WordPress installation in a separate database. Your existing MySQL or MariaDB database remains unchanged, but its content is not copied to SQLite.
Disabling the plugin reconnects WordPress to the previous database. Content created while using SQLite is not transferred back.
By default, the SQLite database is stored in a randomized path under WP_CONTENT_DIR . '/database'. The full path is recorded in db-path.php and exposed by the DB_PATH constant at runtime.
For example:
WP_CONTENT_DIR . '/database/.ht.020a33c5d9e5407e8e93b43e55abf62e/.ht.sqlite'WP_CONTENT_DIR . '/database/db-path.php' as return __DIR__ . '/...';DB_PATHThe random path makes the database location difficult to guess when it is not otherwise protected. We recommend setting DB_PATH to an explicit, protected path outside the web root that your web server does not expose.
Integrations should always read DB_PATH after WordPress loads instead of assuming a fixed database path.
To properly secure the SQLite database, define the DB_PATH constant to an explicit path that is protected from public web access. An explicit DB_PATH value is used as-is without randomization. Define it in wp-config.php:
// Use protected DB path that is not exposed by the web server.
define( 'DB_PATH', '/private/wordpress/database.sqlite' );
Caution: An explicit DB_PATH must point to a protected location that your web server does not expose. Store the database outside the web root and make sure it’s protected.
The value of DB_PATH must be an absolute path to the SQLite database file, or :memory: for an in-memory SQLite database. The database directory must be writable by PHP. Changing DB_PATH selects a different database without moving an existing one.
In addition to the WordPress and PHP versions listed above, the plugin requires the PDO SQLite PHP extension and SQLite 3.37.0 or newer. The setup screen also needs write access to the wp-content directory and will detect conflicting database drop-ins.
Feedback helps improve the integration. For troubleshooting, questions, suggestions, or feature requests, open an issue in the SQLite GitHub repository.
Contributions are welcome through the SQLite Database Integration repository on GitHub.
Yes. The plugin replaces the default MySQL-based database layer with an SQLite-backed implementation. WordPress continues to use the wpdb API, while queries are internally adapted to SQLite syntax and behavior.
INTERVAL operators (#539)ROLLBACK as the first transaction of a connection (#537)FOUND_ROWS() without SQL_CALC_FOUND_ROWS (#533)CREATE TEMPORARY TABLE IF NOT EXISTS and DROP TEMPORARY TABLE as the first temporary table (#524)SQLite Database Integration 3.1 is here! 🎉
This release improves database storage and configuration and fixes several MySQL compatibility issues.
What’s new
Version 3.1 improves how WordPress sites store, locate, and protect their SQLite databases. It also fixes SQL behavior and export compatibility:
wp-content/database/, recorded in wp-content/database/db-path.php. (#502)DB_PATH: Configure the database with one full-path constant, also available at runtime for integrations. (#512)IF() condition evaluation and make TRADITIONAL enable its component SQL modes. (#518, #509)utf8mb4_unicode_520_ci for new tables created with WordPress’s charset settings, improving exports to MariaDB. Existing tables keep their recorded collation. (#514)For more information about database paths and secure configuration, read the database storage guide.
Upgrading to 3.1
Upgrading an existing SQLite site is straightforward:
Existing .ht.sqlite and .ht.sqlite.php databases move to the randomized layout automatically unless a database file path is explicitly configured.
To properly secure the database, set DB_PATH in wp-config.php to an absolute file path outside the web root that your web server does not expose. Its directory must be writable by PHP. Changing DB_PATH does not move an existing database.
Breaking changes
Review these changes if you use custom database settings or integrations:
wp-content/database/. Explicitly configured file paths stay unchanged. Integrations, including backup and migration tools, must read DB_PATH after WordPress loads instead of assuming a fixed filename.DB_DIR and DB_FILE are now deprecated. They and the previously deprecated FQDB and FQDBDIR remain supported, but DB_PATH takes precedence. Conflicting values trigger warnings.:memory: remains available for in-memory databases.Thank you
Thank you to everyone who contributed, tested, and helped update integrations.
Changes since 3.0.2: v3.0.2...v3.1.0
SHOW CREATE TABLE primary keys (#500)SQLite Database Integration 3 is here! 🎉
This release introduces an all-new SQLite database driver for WordPress, rebuilt from the ground up. Its purpose-built MySQL lexer, parser, and emulation layer deliver broader compatibility, more accurate behavior, and a stronger foundation for future improvements.
The 3.0 release spans nearly two years of work, featuring 160 pull requests and 1,075 commits from 15 contributors.
What’s new
The new driver advances SQLite support for WordPress, plugins, database tools, and other MySQL-based applications. These improvements include:
INFORMATION_SCHEMA tables.SHOW and DESCRIBE statements provide accurate MySQL-like metadata.For more information about the new driver and its architecture, read the driver announcement.
Modular design
The project was redesigned as a set of focused packages, separating the core driver from its WordPress integration:
This architecture opens the driver to new integrations, applications, and development tools beyond WordPress.
Upgrading to 3.0
Upgrading an existing SQLite site is straightforward:
On first connection, the new driver automatically initializes its metadata without changing your tables or content.
If you used the new driver preview, you can now delete the WP_SQLITE_AST_DRIVER flag.
Breaking changes
Most WordPress sites need no changes. Review the following if you use a custom setup:
WP_SQLITE_AST_DRIVER feature flag was removed.3.37.0 or newer is required.WP_SQLITE_UNSAFE_ENABLE_UNSUPPORTED_VERSIONS opt-in enables limited SQLite 3.27.0–3.36.x support.DB_NAME is required:
DATABASE_ENGINE was removed. Use DB_ENGINE.DATABASE_TYPE is deprecated. Use DB_ENGINE.FQDBDIR is deprecated. Use DB_DIR.FQDB is deprecated. Use DB_DIR and DB_FILE.WP_SQLite_Driver is deprecated. Use WP_MySQL_On_SQLite.WP_PDO_MySQL_On_SQLite was replaced by WP_MySQL_On_SQLite.WP_SQLite_Driver_Exception was replaced by WP_MySQL_On_SQLite_Exception.WP_PDO_Proxy_Statement was replaced by WP_MySQL_On_SQLite_Statement.$GLOBALS['@pdo']:
$GLOBALS['@pdo'] is no longer supported.$GLOBALS['@pdo'] is deprecated. Use $wpdb->get_driver()->get_sqlite_pdo().pdo sqlite_pdo.journal_mode sqlite_journal_mode.synchronous sqlite_synchronous.Thank you
Thank you to everyone who helped build, test, review, and improve the new driver. Your work made this possible.
3.0 milestone: 160 pull requests
Changes since 2.2.23: v2.2.23...v3.0.0
| Version | Download | Type |
|---|---|---|
| 3.1.1 | Download | Stable |
| 3.1.0 | Download | Stable |
| 3.0.2 | Download | Stable |
| 3.0.1 | Download | Stable |
| 3.0.0 | Download | Stable |
| 2.2.23 | Download | Stable |
| 2.2.22 | Download | Stable |
| 2.2.21 | Download | Stable |
| 2.2.20 | Download | Stable |
| 2.2.19 | Download | Stable |
| 2.2.18 | Download | Stable |
| 2.2.17 | Download | Stable |
| 2.2.16 | Download | Stable |
| 2.2.15 | Download | Stable |
| 2.2.14 | Download | Stable |
| 2.2.13 | Download | Stable |
| 2.2.12 | Download | Stable |
| 2.2.11 | Download | Stable |
| 2.2.10 | Download | Stable |
| 2.2.9 | Download | Stable |
| 2.2.8 | Download | Stable |
| 2.2.7 | Download | Stable |
| 2.2.6 | Download | Stable |
| 2.2.5 | Download | Stable |
| 2.2.4 | Download | Stable |
| 2.2.3 | Download | Stable |
| 2.2.2 | Download | Stable |
| 2.2.1 | Download | Stable |
| 2.2.0 | Download | Stable |
| 2.1.16 | Download | Stable |
| 2.1.15 | Download | Stable |
| 2.1.14 | Download | Stable |
| 2.1.13 | Download | Stable |
| Development | Download | Trunk |