If I run drush cc all or drush --root=/path/to/my/docroot cc all, I get...

No Drupal site found, only 'drush' cache was cleared.

If I run drush -vd, in amongst the output I see...

DB credentials are invalid.

But if I run drush status, the DB credentials look OK.

What might be preventing drush from finding my Drupal site and connecting to the database?

The site itself is working fine.


  • Drush 8.3.2
  • Drupal 7.67

Output of Drush status looks like...

 Drupal version         :  7.67
 Site URI               :  http://default
 Database driver        :  mysql
 Database hostname      :  10.555.92.12
 Database port          :
 Database username      :  Drupal_User
 Database name          :  my_db_name
 PHP executable         :  /usr/bin/php
 PHP configuration      :  /etc/php.ini
 PHP OS                 :  Linux
 Drush script           :  /home/me/.config/composer/vendor/drush/drush/d
 Drush version          :  8.3.2
 Drush temp directory   :  /tmp
 Drush configuration    :
 Drush alias files      :
 Drupal root            :  /opt/rh/httpd24/root/var/www/html/mysite/docroot
 Drupal Settings File   :  sites/default/settings.php
 Site path              :  sites/default
  • So is your site up and running? Which version of Drush? Which version of Drupal? How does your settings.php entered credentials look like? And last but not least: What's your question? Please edit your question for clarification. Many thanks
    – leymannx
    Jan 13 '20 at 18:14
  • Is your site having a settings.local.php? drupal.stackexchange.com/a/282604/15055
    – leymannx
    Jan 13 '20 at 20:02
  • @leymannx -- I edited the question to clarify that the site is working, and I added the versions and the (anonymized) output of drush status. Yes, the db credentials are in a local settings file. I actually tried copying the creds into settings.php to see if that would help somehow, but I got the same result. Thx
    – arnoldbird
    Jan 13 '20 at 20:05
  • 1
    I am finding I can use drush.phar, and that works, as long as I put drush.phar somewhere in my web directory. I can do 'php drush.phar cc all.' And really for my purposes, that will suffice.
    – arnoldbird
    Feb 13 '20 at 19:44

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.