Config Split Recipe
This recipe installs and configures the Config Split module to manage environment-specific Drupal configurations for development, staging, and production. It provides a baseline setup with pre-defined splits that can be activated by adding custom logic to your settings.php file.
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
- Add settings.php logic to activate the correct split for your environment
- Populate your split folders with environment-specific configuration
- Test config import/export workflows across all environments
- 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.phplogic 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.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | Jun 16, 2026 |