2
  1. In my sites/default/settings.php I changed:

    $config_directories = array(
        CONFIG_SYNC_DIRECTORY => 'sites/default/config-sync',
    );
    
  2. I created the folder config-sync in sites/default/
  3. When I do drush cex I get this message in my Terminal window:

Choose a destination. [0] : Cancel
[1] : sync
[2] : staging

What do I have to do? Because I want all my configuration files in sites/default/config-sync because this directory is tracked by Git.

2

You just need to execute the command with the "destination" parameter:

$ drush cex sync

as CONFIG_SYNC_DIRECTORY is the same as $config_directories['sync']

0

You must define your config directories in settings.php, like this:

$config_directories['import'] = '../config/import';
$config_directories['export'] = '../config/export';

Now you can use these with drush:

drush cex export
drush cim import

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.