aaemnnosttv / wp-sqlite-db
SQLite drop-in database driver for WordPress
Installs: 46 073
Dependents: 4
Suggesters: 1
Security: 0
Stars: 555
Watchers: 20
Forks: 94
Open Issues: 10
Type:wordpress-dropin
Requires
- php: >=5.6
- ext-pdo: *
- composer/installers: ^1.0 || ^2.0
Requires (Dev)
- phpunit/phpunit: ^5 || ^6 || ^7 || ^8 || ^9
- roots/wordpress: ^6
- wp-cli/core-command: ^2
- wp-phpunit/wp-phpunit: ^6
- yoast/phpunit-polyfills: ^1
README
A single file drop-in for using a SQLite database with WordPress. Based on the original SQLite Integration plugin.
Installation
Quick Start
- Clone or download this repository
- Copy
src/db.php
into the root of your site'swp-content
directory
Via Composer
composer require koodimonni/composer-dropin-installer
- Add the configuration to your project's
composer.json
under theextra
key
"extra": {
"dropin-paths": {
"wp-content/": ["package:aaemnnosttv/wp-sqlite-db:src/db.php"]
}
}
composer require aaemnnosttv/wp-sqlite-db
Overview
Once the drop-in is installed, no other configuration is necessary, but some things are configurable.
By default, the SQLite database is located in wp-content/database/.ht.sqlite
, but you can change this using a few constants.
define('DB_DIR', '/absolute/custom/path/to/directory/for/sqlite/database/file/'); define('DB_FILE', 'custom_filename_for_sqlite_database');
Credit
This project is based on the SQLite Integration plugin by Kojima Toshiyasu.