Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I installed Drush and then I installed Drupal using the regular installer/method.

When I type drush cc all on my terminal I get

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

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

No, you do not need to install Drupal using Drush in order to use Drush. All you need is to make sure that while running drush cc all, you are in the Drupal directory.

For example, if your Drupal lies under /var/www/Projects with root name as drupal then first you need to move inside /var/www/Projects/drupal and then run the drush cc all command.

The reason being, Drush can be executed inside a Drupal environment only.

share|improve this answer
    
Technically Drush can be executed outside of a Drupal environment. Most commands such as enabling module and clearing site cache need to be in Drupal environment. Though "drush cc drush" will clear the drush cache no matter where you are. This needs to be done if you downloaded a new drush extension. Also "drush dl" can be run anywhere, for instance to download Drupal itself. –  tedbow May 27 at 11:31
    
right, for anything you need to make database connection for example enabling a drupal module, you have to run it with in drupal env. –  arpitr May 27 at 13:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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