I am running Drush version 6.2.0 and the latest Drupal 8 beta on Dreamhosters. When I run drush cc all within the sites directory, I receive the following error immediately after executing the command:

Fatal error: Class 'Drupal\Core\Session\AccountInterface' not found in /home/mywebsite/mywebsite.com/core/includes/bootstrap.inc on line 63 Drush command terminated abnormally due to an unrecoverable error.

Error: Class 'Drupal\Core\Session\AccountInterface' not found in /home/mywebsite/mywebsite.com/core/includes/bootstrap.inc, line 63

Why does it happen? How can I fix this?

4 Answers 4


Drush 6 does not support Drupal 8. You must use drush 7.0-rc1 with Drupal 8 beta 9, or drush master head with Drupal 8 head.

UPDATE: Drush 7 no longer supports Drupal 8; now, use Drush 8 with Drupal 8.


If you are using Drush 8 with Drupal 8 and still getting this error... Please make sure path is correct. For me it worked after setting path variable as:-

export PATH="$HOME/.composer/vendor/bin:$PATH"
  • Thanks! I had landed in this post with a similar problem (when using drush site-install with a local Drush 8 to install Drupal 8) and setting the path to composer/vendor/bin worked fine.
    – dinopmi
    Dec 18, 2015 at 14:37
  • Awesome! After a Drush reinstall, this turned out to be a much simpler fix. Oct 27, 2016 at 18:44
  • vote up, work for me too
    – Yuseferi
    Nov 12, 2016 at 22:41
  • Where do I add this code ? Feb 8, 2017 at 7:59

As for Drupal 8, drush cc all is no longer the way to clear cache, use drush cr instead:

`cache-clear all` is deprecated for Drupal 8 and later. Please use the `cache-rebuild` command instead.                                                                  [error]

I ran into the same error using Drush 5.10.0 from a previous Drupal 7 project. If you have composer installed globally you can upgrade Drush to the latest version using:

$ composer global require drush/drush:dev-master

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.