0

Drush says it downloads a module successfully but instead of putting it in sites/all/modules it puts it in the current directory: $ drush dl module_filter Project module_filter (7.x-2.0-alpha2) downloaded to [success] /drupal/module_filter. The folder doesn't exist, but if you run the command again the following happens: $ drush dl module_filter Install location drupal/module_filter already exists. Do you want to overwrite it? (y/n):

drush version 7.x

  • Perhaps drush isn't able to connect with the drupal db correctly. Sometimes, I've found that drush works better if the db_host is set to 127.0.0.1, rather than localhost in settings.php. – Ollie Mar 6 '14 at 0:10
2

Drush will put downloaded modules in the current directory if it cannot bootstrap a Drupal site. Run drush status to determine whether or not the Drupal site you think you are operating on is recognized by Drush. You might need to use the --uri option to specify the name of the folder that contains the settings.php file, or set up a Drush alias file.

  • Hmm running drush status --uri=sites/default shows php and drush version. It does not show the regular drupal instances. Further drush dl drupal should work anywhere I would assume, but I get the same behavior. – nicxvan Mar 6 '14 at 12:17
  • You do not need --uri if settings.php is in the default folder. If settings.php is in sites/foo.com, then use --uri=foo.com. You must also tell Drush where your Drupal root is. cd /path/to/drupalroot/ or drush --root=/path/to/drupalroot. Read the README and the beginning of definitivedrupal.org/book/26-drush (sample chapter for book, available for free download). – greg_1_anderson Mar 6 '14 at 14:44
  • Why is it creating psuedo modules though the modules don't actually show up in the filesystem? I had previously had drush working and it just stopped. There is a default/settings.php with a valid db hooked up. I find also that I can correctly download modules if I have not enabled xampp. However I cannot run any commands like drush en or drush hlp. I also set up an alias like the chapter mentioned and it returns the same result. If I visit the virtual host I get the site so I know it's a valid directory. – nicxvan Mar 10 '14 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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