Database adapters for Payload CMS 17

Official adapters for Postgres, MongoDB and SQLite, including Cloudflare D1. Community adapters add MySQL, Convex, DynamoDB and embedded PGlite.

Database adapter that runs Payload on SurrealDB through its PostgreSQL-compatible SQL interface

Stores Payload data in a Postgres database, with migrations and read replica support

Vercel Postgres database adapter that stores Payload collections and globals in Postgres

Stores Payload data in Cloudflare D1 SQLite databases from Workers

Stores Payload collections and globals in a MongoDB database

Official SQLite database adapter that stores Payload collections and globals in SQLite

Database adapter that maps Payload collections onto an existing Prisma schema

Stores Payload collections and globals in SurrealDB as schemaless documents

Embedded PGlite Postgres database for Payload, with no separate database server

Stores Payload collections and globals in Convex as the database, with real-time sync

Stores Payload data in ClickHouse, with edge-ready HTTP access and an embedded local mode

Database adapter that routes reads and writes between a local and a remote database

About these packages

A database adapter connects Payload to the database that stores your collections, globals and versions. Every project uses exactly one, set in the db option of payload.config. Switching it later means moving your data.

What these adapters cover

  • Official Postgres adapters built on Drizzle ORM, including Vercel Postgres
  • The official MongoDB adapter built on Mongoose
  • Official SQLite adapters for libSQL and Cloudflare D1
  • Community adapters for MySQL and MariaDB, Convex, DynamoDB, ClickHouse and SurrealDB
  • Embedded PGlite, Prisma on an existing schema, and DB Composite sync
  • Vector stores in pgvector, MongoDB and Cloudflare Vectorize

Choosing a database adapter

Pick Postgres if you want SQL and generated migrations. Pick MongoDB if your team already runs it. D1 fits projects on Cloudflare Workers, and Vercel Postgres fits projects on Vercel. For local development without a database server, SQLite or PGlite is enough. Community adapters vary a lot, so check the release history and the supported Payload version before you commit to one. The DynamoDB adapter, for example, targets the Payload 4 beta. To import content from another CMS, use the data migration tools.

Frequently asked questions

Should I use Postgres or MongoDB with Payload CMS?

The Payload team maintains both. Postgres works through Drizzle ORM and generates migrations as your config changes. MongoDB stores documents in a shape close to Payload's own data. Choose the database your team can run and back up with confidence.

Can I run Payload on SQLite?

Yes. The official SQLite adapter runs on libSQL, and the D1 adapter stores data in Cloudflare D1. SQLite works well for small sites, local development and projects on Cloudflare.

What are the vector adapters for?

They store embeddings for semantic search in pgvector, MongoDB or a Cloudflare Vectorize index. They run next to your main database adapter, which still holds your collections.