An external database is a database that you host outside Wix and connect to a Studio Two site. After you connect it, the database's tables appear in the site's CMS as collections. Site code reads and writes them with the same Data API that it uses for the site's other collections.
Connect an external database when the site's data needs to stay outside Wix, for example because other systems already use it. To decide between the CMS and an external database, and to compare what each supports, see Choose Your Database.
Wix doesn't connect to the database directly. Instead, Wix Data sends each request to an adapter, which is a web service that you host at a public HTTPS URL. The adapter runs the request against the database and returns the result in the format that Wix Data requires.
Each request goes through these stages:
Every external database connection needs an adapter. An adapter implements the External Database service plugin. The service plugin defines the endpoints that Wix Data calls under the adapter's base URL, such as /v3/items/query.
An adapter must implement at least these endpoints:
The other endpoints are optional. Implement the endpoints for the operations that you want the site to support, such as Insert Data Items and Update Data Items.
You can build your own adapter, or deploy Wix's open-source adapter, velo-external-db, which supports several databases, including MySQL and PostgreSQL. Deploy it from its default branch, which implements the External Database service plugin, not from the adapter-v2 branch, which implements a legacy protocol.
The Studio Two editor has no UI for connecting an external database. Connect one with code or with an app. Both ways use the same kind of adapter:
Connect with code to give one site access to a database. Connect with an app to reuse the same adapter on several sites, or to let other Wix users install it.
Each collection that the adapter exposes appears on the site with an ID in the form <prefix>/<collectionId>:
myDatabase/products.Use the full ID wherever you name the collection, such as in a Data API query.
What the site can do with an external collection depends on the adapter and the database:
_id, _createdDate, _updatedDate, and _owner fields. Without these fields, the collection is read-only.Like CMS collections, external collections have CMS Data Sources, so you can display their items on pages and in dynamic pages.
External collections never trigger data events, and their query results are never cached.
Connecting an external database doesn't require a premium plan.
Last updated: 2 November 2026