Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

Changing the configuration synchronization directory

14/04/2025, by Ivan

By default, Drupal places the configuration synchronization directory within the site's files directory, using a hash as part of the folder name, for example: sites/default/files/config_HASH.

The HASH is a long string of random characters. This makes accessing configuration via the web more difficult (though not impossible). The sync directory location can be changed after installation.

On production sites, and if your account has the necessary permissions, it is recommended to move the configuration sync directory completely outside the site's root. Since your configuration directory should be version-controlled, your version control repository's root should be one level above your site's web root.

On local development sites, you might want easier access to configuration files and could move the directory to something like sites/default/sync.

To move the directory, open your settings.php file. Near the end, Drupal’s installer writes a line defining the current location of the sync directory, typically sites/default/files/config_HASH.

If the sync directory is missing, you may see an error message in your PHP logs such as:

Uncaught PHP Exception Exception: "The configuration directory type 'sync' does not exist"

If you want to move this folder to sites/default/sync, update the $config_directories variable like this:

$config_directories[CONFIG_SYNC_DIRECTORY] = 'sites/default/sync';

To move the folder outside the web root, use something like:

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

where config is a sibling directory to your web root, and sync exists within config.

That’s it! Now, when using the configuration management UI or a Drush-based workflow, the correct directory will be used.

Syntax Changes in Drupal 8.8.0

As of Drupal 8.8.0, the configuration sync directory is defined in $settings rather than $config_directories. You must update your settings.php accordingly.

Change from:

$config_directories['sync'] = 'foo/bar';

to:

$settings['config_sync_directory'] = 'foo/bar';

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.