I installed Drush, but most of the commands doesn't work, I guess. I tried drush cc all and got the following output:

Command cache-clear needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command.
The drush command 'cc all' could not be executed.
A Drupal installation directory could not be found

drush status outputs the following:

PHP configuration : /etc/php5/cli/php.ini
Drush version : 4.5
Drush configuration :
Drush alias files :

6 Answers 6


You need to rebuild cache with Drupal 8, rather than clear it:

drush cr
  • Got the same . The drush command 'cr all' could not be found.
    – KTM
    Commented Apr 28, 2016 at 8:42
  • Sounds like you're not running inside a Drupal website. The above is sound though, there's no drush cc for Drupal 8
    – Clive
    Commented Apr 28, 2016 at 8:44
  • yes am running from /var/www-drupal , and its giving output for drush status
    – KTM
    Commented Apr 28, 2016 at 8:45
  • but status is not listing fully i guess : PHP configuration : /etc/php5/cli/php.ini Drush version : 4.5 Drush configuration : Drush alias files :
    – KTM
    Commented Apr 28, 2016 at 8:48
  • 3
    try " drush cr " instead of using drush cr all :)
    – Leopathu
    Commented Apr 28, 2016 at 10:57

You can even try:

  • drupal 7 :drush cache-clear all
  • drupal 8 : drush cache-rebuild

Refer two articles you can have some more idea on clearing and rebuilding cache:

  1. http://www.metaltoad.com/blog/drupal-8-first-impressions-back-end-developer

  2. https://www.drupal.org/documentation/clearing-rebuilding-cache


Shouldn't you be using Drush 8.* for Drupal 8? I believe your version is just outdated. (And you need drush cr as Clive pointed out.)


If your drush status does not say anything about the database then it is not connecting to the database and thinks your site is effectively dead. This is very VERY common for new sites. Possible fixes:

  1. Make sure your in the same directory that the index.php file is in for drupal.

or if in multisite setup then.

  1. Make sure you are in the $rootdir/sites/yoursitename/ subdirectory when you execute "drush st".


  1. Make sure you supply the --uri="myawesomesite.local" to tell drush which settings.php file to try to find and use.

  2. Make sure you can load your site in your browser first.

See sample screenshotenter image description here


This happens to me on ever single D7 installation and I solve it by changing the host setting for the DB in my settings.php file from "localhost" to " image description here"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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