How to Run a WordPress Site on SQLite Instead of MySQL
WordPress expects MySQL or MariaDB, so most installs start with a database server, a database user, and a password to keep track of. That setup works well, but it is more moving parts than a small site needs. You can run a wordpress site on sqlite instead, with the whole database stored in a single file on disk and no database server running at all. This guide shows how it works, how to set it up with the official plugin, and how to tell whether your site is a good fit.
What Running a WordPress Site on SQLite Actually Means
SQLite is a database engine that lives inside a file rather than inside a separate server process. WordPress normally talks to MySQL through a database driver, and the SQLite Integration plugin swaps in a different driver so WordPress talks to a SQLite file instead. Your posts, pages, comments, settings, and user accounts end up in that file, usually named .ht.sqlite inside wp-content/database/. The rest of WordPress stays the same.
The practical difference is what you no longer run: no MySQL service, no database user, and no database password in wp-config.php. That makes a wordpress site on sqlite easy to copy or back up, since the files plus the one database file are the whole site.
When SQLite Fits a WordPress Site
SQLite fits best when the site is small and quiet: a personal blog, a documentation site, a portfolio, or a small business brochure site with a few hundred visitors a day. Reads are fast, and writes happen one at a time, which is fine when only the site owner is publishing and a handful of visitors are commenting.
It also fits a throwaway copy of a site: spin up a local WordPress copy without installing MySQL, test a theme change, then delete the folder. The same trick works for staging on a low-memory VPS, where one less service leaves more RAM for PHP and the web server. Our guide to tune MariaDB for a low-memory VPS shows what the MySQL side costs in memory.
When SQLite Does Not Fit
The limits show up as soon as writes pile up. SQLite allows only one writer at a time, so when two processes try to write at once, the second one waits. On a busy site, comment submissions, form entries, and admin saves can queue up and time out. That is the core of the sqlite database limitations to plan around: single-writer locking, no built-in replication, and no separate database server to scale apart from the web server.
Do not use SQLite for WooCommerce or any shop with real orders. Checkout writes to several tables at once, stock counts change with every order, and a locked database at checkout is a lost sale. The same goes for membership sites, forums, and any site where many logged-in users write at the same time. Multisite is also out: the SQLite Integration plugin does not support it.
Large sites are a poor fit too. A database file past a few hundred megabytes gets slower to back up and harder to repair, and many migration and backup plugins built for MySQL will not work with SQLite at all. If your site already has a big MySQL database, read our guide on how to shrink a bloated WordPress database without a plugin before you blame the engine.
What You Need Before You Start
You need a server or local machine with PHP 8.1 or newer, the PHP SQLite extension, and a WordPress download. The wordpress database setup for SQLite is simpler than the MySQL version because there is no database to create first, but the PHP side still has to be right. Check that the extension is loaded:
php -m | grep -i sqlite
You should see pdo_sqlite and sqlite3 in the output. If they are missing, install them for your PHP version. On Ubuntu with PHP 8.3, that is:
sudo apt install php8.3-sqlite3
sudo systemctl restart php8.3-fpm
Adjust the version number to match the PHP version your site runs. If you are unsure which version that is, check it in the WordPress admin under Tools, then Site Health, then Info, then Server.
Install WordPress Without MySQL in Five Steps
Setting up wordpress without mysql takes five steps, close to a normal install, with the plugin doing the database work MySQL normally does.
Step 1: Download and unpack WordPress. Unpack the latest WordPress zip into your web root as your web server user, usually www-data on Ubuntu:
cd /var/www/html
sudo -u www-data unzip latest.zip
sudo -u www-data mv wordpress/* .
Step 2: Add the sqlite integration plugin files. Download the SQLite Integration plugin, built by the WordPress Performance Team, from the plugin directory. Unpack it into wp-content/plugins/, then copy its db.php drop-in file into wp-content/. That drop-in tells WordPress to use SQLite instead of MySQL; without it, WordPress will still ask for MySQL details. Leave the plugin installed and active.
sudo -u www-data unzip sqlite-database-integration.zip -d wp-content/plugins/
sudo -u www-data cp wp-content/plugins/sqlite-database-integration/db.php wp-content/db.php
Step 3: Create the database directory. Make the folder where the SQLite file will live:
sudo -u www-data mkdir -p wp-content/database
sudo chmod 755 wp-content/database
Step 4: Run the installer. Open your site in a browser. The installer skips the MySQL details screen and goes straight to the site title, admin username, and admin email. WordPress creates the .ht.sqlite file during this step. If the installer still asks for a database host and password, the db.php drop-in is not in the right place, so check step 2 again.
Step 5: Check the database file and lock it down. Confirm the file exists and is not reachable from the web:
ls -lh wp-content/database/
curl -I https://example.com/wp-content/database/.ht.sqlite
The file name starts with a dot and the plugin ships rules to block web access, but verify it yourself: the curl check should return 403 or 404, never 200. Also confirm the file owner is the web server user, so WordPress can write to it.
How to Check It Works and Move Back to MySQL
After install, publish a test post, upload an image, add a comment, and install one plugin. If all four work, the database file is writing correctly. Then check Site Health for database errors: the file should grow a little with each post you add. A file that never changes size after you publish means writes are going nowhere, so check the file permissions.
Moving back to MySQL is possible but not one click. Export your content with the built-in WordPress exporter, install a fresh WordPress on MySQL, and import the file. That carries posts, pages, comments, and media references, but not every plugin setting, so note your settings first and test the import on a copy. If the export fails partway, the database file may be locked by a stuck write, so wait a minute and try again rather than deleting the file.
If the install fails with a database connection error, the cause is usually the PHP extension or the drop-in file. Re-check php -m for pdo_sqlite, confirm wp-content/db.php exists, and check the PHP error log for the exact message. For the MySQL version of the same error, see our guide on how to fix the WordPress database connection error.
Backups, Updates, and Day-to-Day Care
Backing up a wordpress site on sqlite is simple: copy the database file along with the rest of the site files. Copy it while the site is quiet, or stop the web server briefly first, because copying a file mid-write can give you a half-written backup. Never edit the live database file by hand while WordPress is running.
For scheduled backups, use the same cron habit as for MySQL. Our guide to back up MySQL databases automatically with mysqldump and cron shows the pattern; for SQLite, swap the mysqldump step for a timestamped file copy, and delete old backups after a set number of days.
Keep the plugin updated with the rest of WordPress. The SQLite driver has to track core changes, so an old driver on a new WordPress release is the most common source of breakage. Update on a copy first when a major release lands. If an update reports a database error right after install, roll the site back from your backup and wait for a driver update rather than editing database files by hand.
SQLite is a good tool for the right site: a small, quiet WordPress install gets a simpler setup, one less service to run, and a database you can copy as a single file. It is the wrong tool for a shop, a busy forum, or a multisite network, where single-writer locking will cost more than the saved setup time. Pick based on how much your site writes, not on how simple the install looks.