WordPress only supports MySQL, but with this plugin created by kjmtsh you can use SQLite instead.
The plugin was created a long time ago but still works like a charm on the current latest WP version (v5.2 – Jun 2019).
This solution is not meant to be used in production for large websites, but it can be an interesting option if you have a small blog with few visitors. An SQLite version works better than MySQL on a server with very limited resources.
By the way, this blog runs on SQLite ;)
To migrate an existing site, see instructions at the end.
0. Same tutorial as video (3 min, no sound):
1. Download WordPress and “SQLite Integration“:
wget https://wordpress.org/latest.tar.gz wget https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip ls (out)latest.tar.gz sqlite-integration.1.8.1.zip
2. Extract files:
tar -xf latest.tar.gz unzip sqlite-integration.1.8.1.zip ls (out)latest.tar.gz wordpress sqlite-integration.1.8.1.zip sqlite-integration
3. Remove zip files (optional, for cleanup):
rm latest.tar.gz rm sqlite-integration.1.8.1.zip ls (out)wordpress sqlite-integration
4. Move plugin to
mv sqlite-integration wordpress/wp-content/plugins/
cd wordpress mv wp-content/plugins/sqlite-integration/db.php wp-content/ ls wp-content (out)db.php index.php plugins themes
mv wp-config-sample.php wp-config.php
7. Run the WP installer as usual:
php -S localhost:3000 (out)PHP 7.3.6-1 Development Server started at Sun Jun 16 22:29:00 2019 (out)Listening on http://localhost:3000 (out)Document root is /home/daniel/wordpress (out)Press Ctrl-C to quit.
Open the page (
http://localhost:3000/) and proceed with the installation.
No need to provide database information (the step will be skipped):
- If you see the “PDO Driver for SQLite is missing” error, install the
php-sqlitepackage and restart the service:
Migrating an existing website:
NO NEED to convert MySQL to SQLite.
Just use Duplicator (or any other migration plugin).
Install a brand new copy of WordPress with SQLite, then:
- Install Duplicator plugin on both websites (existing and brand new copy instances);
- Do a backup of your existing website using Duplicator;
- Restore the backup on the brand new instance using Duplicator’s “restore”;