Recipe logo

This project is not covered by Drupal’s security advisory policy.

A Drupal recipe that installs Config Split and creates an opinionated baseline of three environment-specific split entities (dev, staging, prod) for managing configuration across different deployment environments.

What This Recipe Provides

This recipe automates the setup of Configuration Split with pre-configured split entities for common deployment workflows:

Dev split – Enables admin tools, debugging modules, and development-focused configuration
Staging split – Contains pre-production testing configuration overrides
Prod split – Carries production-ready performance and security-related configuration

How It Works

The recipe creates three split entities with `status: false` by default. You activate the appropriate split for each environment by adding override logic in your `settings.php`:

```php
// Example: Activate the correct split based on environment
$split = getenv('DEPLOY_NAME') ?: 'dev';
$config['config_split.config_split.' . $split]['status'] = TRUE;

Split folder contents are stored under config/split/{dev,staging,prod}/ and are read by Config Split at runtime (they are not imported by this recipe).

Installation

composer require drupal/config_split_recipe

drush recipe config_split_recipe

drush cr

Post-Apply Steps

  1. Add settings.php logic to activate the correct split for your environment
  2. Populate your split folders with environment-specific configuration
  3. Test config import/export workflows across all environments
  4. Adjust split blacklists/graylists to match your project needs

Requirements

  • Drupal 10.3 or Drupal 11
  • Config Split 2.x

Important Notes

  • This is a baseline, not a fully generic Config Split toolkit
  • Split activation requires custom settings.php logic tailored to your hosting platform
  • The shipped split definitions may need adjustment for your specific project
  • Split entities are created disabled; you control when they activate

Recommended companion project:

Recipes Manager makes recipes much easier to work with in real projects because it brings recipe discovery and management into the Drupal UI. If your team wants a smoother editorial and admin workflow for applying and reviewing recipes, this is the easiest way to get it.

Supporting organizations: 

Project information

Releases