After having istalled drush via composer locally I had to make the following changes inside sites\default\settings.php for it to work:

  • Create the database connection array

    $databases['default']['default'] = array (
      'database' => 'Drupal',
      'username' => 'root',
      'password' => '',
      'host' => 'localhost',
      'port' => '33067',
      'driver' => 'mysql',
      'prefix' => '',
      'collation' => 'utf8mb4_general_ci',
  • Add the following line

    $settings['hash_salt'] = 'CHANGE_THIS';

After that, Drush works on my 8.6.11 drupal site. However, on Drupal 8.7.1, I get the following exception when running almost all commands.

In bootstrap.inc line 212:

The configuration directory type 'sync' does not exist

Strangely enough, drush cr works fine.

Do I have to create some new directories? May it be connected to the fact that in Drupal 8.7.1 there is no longer a web sub-directory in root?

  • Welcome to Drupal Answers! Drupal doesn't create any web directory. That is the directory created, for example from drupal-composer/drupal-project. Updating to Drupal 8.7.1 would not remove a web directory. Anyway, the error is saying it doesn't find the sync directory. Check where that directory is and check where the settings.php file is searching that directory. – kiamlaluno May 30 '19 at 7:29
  • @kiamlaluno How do I check where settings.php is searching for the 'sync' directory? – Tommy Jun 1 '19 at 11:04
  • Once Drupal is installed, the settings.php file contains a line initializing $config_directories['sync'], similar to $config_directories['sync'] = 'sites/default/files/config_2D33-GIrfpU66Rle01AJsMJiVjrvmDkRuqic0XY_tqnqFFK1qjg9oZ2uv0MnKmgKtJd_IqdoJg/sync';. It is usually one of the last lines in the settings.php file. – kiamlaluno Jun 1 '19 at 11:18

Your Answer

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

Browse other questions tagged or ask your own question.