Main website
Government Drupal Developers NetworkCommunity
Resource library
Guide

Managing environment config with Config Split

Keep dev-only modules out of production and stop config imports from fighting each other.

7
MB
Marcus Bell

Brighton & Hove City Council · 6 Jul 2026

Open drupal.org(opens in a new tab)

The problem

You want devel and stage_file_proxy locally, but never in production. Plain config sync can't express that.

Set up a split per environment

composer require drupal/config_split
drush en config_split -y

Create a split called local in Configuration → Config Split and add the dev modules. Then activate it from settings.local.php:

$config['config_split.config_split.local']['status'] = TRUE;
$config['config_split.config_split.prod']['status'] = FALSE;

Deploy

drush deploy   # updatedb + config:import + cache rebuild + deploy hooks

Tip: never edit split config in production. Export locally, commit, deploy.

Join GDDN to upvote and share your own resources.