Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
feat(db-sqlite): add WAL mode support (#15278)
Adds support for [WAL](https://sqlite.org/wal.html) mode.
Fixes https://github.com/payloadcms/payload/issues/9290
```ts title="Example SQLite Adapter with WAL"
import { sqliteAdapter } from '@payloadcms/db-sqlite'
export default buildConfig({
// Your config goes here
collections: [
// Collections go here
],
// Configure the SQLite adapter here
db: sqliteAdapter({
wal: true, // Enable WAL mode with default settings,
wal: { synchronous: 'NORMAL' }, // with configurable settings
client: {
url: process.env.DATABASE_URL,
},
}),
})
```
Settings for the `wal` option:
| Setting | Description | Default |
| ------------------ |
-------------------------------------------------------------------------------------------------
| ----------------- |
| `journalSizeLimit` | Max size of the WAL file before checkpointing to
the main DB. | `67108864` (64MB) |
| `synchronous` | WAL sync mode: `EXTRA`, `FULL`, `NORMAL`, `OFF`.
Controls balance of performance vs. data safety. | `'FULL'` | S
Sasha committed
3357aa6b6c5452482fb7ef073e1fa90ff91b9f42
Parent: 4f5a9c2
Committed by GitHub <noreply@github.com>
on 1/22/2026, 3:38:38 PM