Wix's built-in data management solution is the Wix Content Management System (CMS). While CMS collections cover a wide range of use cases for content-driven websites and applications, some projects may have specific requirements that can't be addressed by the integrated database solution.
To address such cases, Wix allows users to connect an external database to Wix sites using an external database adaptor. Once the connection is set up, users can interact with these databases and use them to populate site elements as though they were Wix CMS collections.
This article gives an overview of the ways you can connect an external database to Wix sites using an external database adaptor.
You can work CMS collections and connected external databases in the following IDEs:
To establish a connection between a site and an external database, you need to prepare an external database adaptor.
An external database adaptor is a server that translates Wix Data requests from your site to an external database’s protocol and translates the response back to a Wix Data format. From the Wix site’s point of view, the external database is a data collection and behaves exactly like an internal collection. This means that your external database collections can be managed via the Wix Data APIs (REST|SDK), and used (with or without datasets) to populate Wix UI elements like repeatersand tables.
External database flows:
A Wix Data request is made to an external database collection. The request is sent to the adaptor.
The adaptor validates the request and translates it to a native database request in the required protocol.
The native protocol request is sent to the external database.
The external database sends a response in its native protocol and format.
The adaptor translates the response to a Wix Data format.
The translated response is sent to the Wix site and processed in the same way as an internal data response.
You can prepare an external database adaptor in one of the following ways:
Wix created out-of-the-box container image adaptors for several databases on external platforms, including AWS, Azure, and Google Cloud Platform.
The following database types are supported with out-of-the-box adaptors:
MySQL
MySQL supports vanilla MySQL versions 5.7 to 8.0. This includes variants like MariaDB and Percona Server for MySQL, as MySQL APIs are fully compatible.
The following managed versions of MySQL are supported:
Postgres
Open-source versions 9 to 13.
The following managed versions are supported:
MS SQL
Microsoft SQL Server server can be connected both as an on-premises, self-managed installation or managed version where available:
Google Cloud Spanner
Google Cloud BigQuery
Learn how to deploy an out-of-the-box external database adaptor for:
Once you've prepared an external database adaptor, you can use it to connect Wix sites to the external database.
If you implemented your adaptor as part of a Wix app, the connection is made automatically when the app is installed on a site.
Otherwise, you need to make the connection manually using either of the following methods:
You can use existing data from your external database in your Wix site. If you want your existing database table to be read-write on your site, it must contain the following columns:
Tables without these columns are read-only in your Wix site.
When creating new tables, include these columns to make the table writable from your site.