Drupal to CouchDB Deployment

Last updated on
30 April 2025

In Drupal 8 Deploy can now to deploy to (and from) CouchDB.

Many of the steps are the same as the Drupal to Drupal Deployment the only change come when you come to setup an external endpoint.

Configuring endpoints

In "Configuration" then "Relaxed Endpoints" by default you have the option to create a "Default workspace" endpoint, or an "External endpoint" endpoint. For CouchDB you will need an "External endpoint", here you can add a url, then an optional username and password. Enter the full URL of your CouchDB database, eg https://example.com:5984/foobar, then the username and password if you have one. Upon saving your endpoint will be checked to see if it returns a response.

Doing a deployment

Just like a Drupal to Drupal deployment go to "Structure" then "Deployment" or use the deploy link in the top right of the toolbar to get the to the deployment page. Here you can select the source and target endpoints. The source will be your "Default workspace" endpoint, and the target will be your "External endpoint". Click push and the deployment will start.

To pull down from your CouchDB database just reverse the source and target. Set the source as the "External endpoint" and target as "Default workspace". This workflow allows you to backup or stage content on CouchDB and replicate content from Drupal to CouchDB, then back from CouchDB to a different Drupal site.

Creating a Drupal Content Hub

Screencast: https://www.youtube.com/watch?v=CTqAyYcLZB0"
When you are managing multiple sites you can easily manage the distribution of content with Deploy. There are many enterprise level services to host a CouchDB database then using Deploy you can replicate all of your content there. This content can then be replicated back to a number of other Drupal sites allowing authors and site owners to reuse content from other sites. The data is stored in CouchDB as JSON and includes all fields and attributes of the original content entity.

Other systems, such as PouchDB can also replicate the entities down from your Drupal Content Hub and use it for creating decoupled Drupal sites without even connecting to your Drupal site.

Help improve this page

Page status: Not set

You can: