Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

1. Installation and Basic Usage > Telling Drush which site to work with

Telling Drush which site to work with

Some Drush commands are to be executed on a non-Drupal directory (for example, site-install), others behave differently when executed on a Drupal directory (such as pm-download), and the remaining ones must be called within or referencing a Drupal directory (sql-connect). Here, we will explain how to tell Drush explicitly or implicitly that we want it to work with a Drupal site in particular.

Drush gathers information from arguments, options, and configuration files, creating a context.

The recommended method for working with Drush, against a Drupal site, is to run all commands from the root path of the site (where the index.php file is). This means that if, for example, a Drupal site is installed at /var/www/drupal7/ and its settings file is located at /var/www/drupal7/sites/default/settings.php, you could clear the cache by doing the following:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial