This is a very useful tutorial for config_split

https://www.prometsource.com/blog/configuration-split-managing-drupal-8-configuration-different-environments

https://www.advomatic.com/blog/using-configuration-split-to-have-dev-only-configuration-in-drupal-8

If you want to learn more about the core D8 configuration management these docs will help:

https://www.drupal.org/docs/8/configuration-management/managing-your-sites-configuration

Step-by-step guide

Add the steps involved:

  1. Move existing configuration to "config/sync"

  2. Edit "$settings['config_sync_directory']" so that is points to "../config/sync"

    $settings['config_sync_directory'] = dirname(DRUPAL_ROOT) . '/config/sync';


  3. Create config/dev directory

  4. Create DEV split configuration from UI (use the above tutorials for details)

  5. Run drush csex dev and drush csex

  6. You're done.

From now on it's enough to use drush cex/cim (without the "s").

Git Workflow Steps to Safely Manage Config Files

A series of screenshots from a must-watch DrupalCon Vienna preso called Advanced Configuration Management with Config Split et al.


 





drush cex # export config
git add && git commit
git pull
composer install
drush updb
drush cim # import config
git push







composer update
drush updb
drush cex # export config
git add && git commit
git push



And here's the complete preso deck:

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.


Review History

Who

When

Status

Bob

20230530

Updated some details - current