D8 Configuration Split

Reviewed 230530

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

  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.

The Problem



Starting off a new project (initial site installation)

 



After you complete some local development that includes config changes




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





Steps to safely update modules or Drupal core




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



And here's the complete preso deck:

Related articles


Review History

Who

When

Status

Who

When

Status

 

 

 

Bob

20230530

Updated some details - current





Related pages