Config Sync Directory Setting Change In Drupal 9

19th August 2020

A change that was snuck into Drupal version 8.8.0 and wasn't mentioned in the 8.8.0 change notes was a small change to the setting that controls the placement of the configuration directories. The alteration deprecated the $config_directories setting from the settings.php file and move the configuration into the $settings array. You can see the detail behind this change on the Drupal change record.

The fix for this is very easy and only needs a single line of code to change in your settings file.

Change this:

$config_directories['sync'] = '../config/sync';

To this:

$settings['config_sync_directory'] = '../config/sync';

This small change has started tripping me up since I have started to run Drupal 9 upgrades since the previous setting was only deprecated and not removed. Once you upgrade to Drupal 9 you'll immediately see a problem with the configuration directory setting not being present. This can be easily corrected by just swapping over the above variables.

Add new comment

The content of this field is kept private and will not be shown publicly.