No Drupal Site Found when clearing cache

by srodrig   Last Updated January 05, 2018 15:07 PM

I installed drush using composer following the instructions here:

When trying to run drush cc all I get this error:

No Drupal site found, only 'drush' cache was cleared.[warning] 'all' cache was cleared. [success]

I added this line:

export PATH="/Applications/MAMP/bin/php/php5.6.2/bin:$PATH"

to my .bash_profile and restarted bash and MAMP. Still no luck. Any ideas?

This is my drush status:

 Drupal version         :  7.36                                                             
 Site URI               :  http://default                                                   
 Database driver        :  mysql                                                            
 Database hostname      :  localhost                                                        
 Database port          :                                                                   
 Database username      :  root                                                             
 Database name          :  srod                                                   
 PHP executable         :  /usr/bin/php                                                     
 PHP configuration      :                                                                   
 PHP OS                 :  Darwin                                                           
 Drush script           :  /Users/srod/.composer/vendor/drush/drush/drush.php 
 Drush version          :  7.0-dev                                                          
 Drush temp directory   :  /tmp                                                             
 Drush configuration    :                                                                   
 Drush alias files      :                                                                   
 Drupal root            :  /Applications/MAMP/htdocs/srodsite                           
 Site path              :  sites/default   

I'm running it from Drupal project folder.

Tags : 7 drush composer

Answers 4

Haven't tried it myself, but maybe you want to try what is mentioned here , and which points to . Here is a quote from it:

Edit the settings.php file of your drupal installation, and go to the database settings entry.

change the host line to:

'host' => php_sapi_name() == 'cli' ? '' : 'localhost',

Curious to hear if that could help ...

May 06, 2015 18:29 PM

I figured out that you will need a mysql server installed and included in path, even if you are using mysql from AWS RDS.

Yuexi Ma
Yuexi Ma
July 02, 2015 14:59 PM

For people working on Windows, you need to verify that your PATH Variable for MYSQL is properly set. I had the problem when I had upgraded my WAMP.

Example like this : C:\wamp\bin\mysql\mysql5.6.17\bin

October 07, 2015 15:55 PM

If you're running inside Drupal root folder, there are two possibilities which may go wrong:

  1. drush cannot find Drupal core files (you don't have index.php or, check by:

    find -maxdepth 2 -name index.php -o -name
  2. Your PHP CLI doesn't have PDO extension (php -m | grep pdo).

March 24, 2016 17:51 PM

Related Questions

drush 7.3 is not working

Updated July 16, 2016 08:03 AM

Freshly installed Drush is unresponsive

Updated May 12, 2016 08:03 AM

Add/Fix composer in an ongoing project

Updated June 07, 2017 09:07 AM

How to install drush 8 properly on Debian 8?

Updated June 16, 2015 03:03 AM