X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Fdocs%2Fusage.md;h=677e79b74cd763c4d4cc16f711ba19b3f10ea0b3;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=bd996c9a4b137368175bbbcf0f88438cad915e7a;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/drush/drush/docs/usage.md b/vendor/drush/drush/docs/usage.md index bd996c9a4..677e79b74 100644 --- a/vendor/drush/drush/docs/usage.md +++ b/vendor/drush/drush/docs/usage.md @@ -1,7 +1,7 @@ Usage ----------- -Drush can be run in your shell by typing "drush" from within any Drupal root directory. +Drush can be run in your shell by typing "drush" from within your project root directory or anywhere within Drupal. $ drush [options] [argument1] [argument2] @@ -13,38 +13,28 @@ For even more documentation, use the 'topic' command: $ drush topic -Options +Using the --uri option and --root options. ----------- -For multisite installations, use the --uri option to target a particular site. If -you are outside the Drupal web root, you might need to use the --root, --uri or other -command line options just for Drush to work. +For multi-site installations, use a site alias or the --uri option to target a particular site. - $ drush --uri=http://example.com pm-updatecode - -If you wish to be able to select your Drupal site implicitly from the -current working directory without using the --uri option, but you need your -base_url to be set correctly, you may force it by setting the uri in -a drushrc.php file located in the same directory as your settings.php file. - -``` -$options['uri'] = "http://example.com"; -``` + $ drush --uri=http://example.com pm:enable + +If you are outside the Composer project and not using a site alias, you need to specify --root and --uri for Drush to locate and bootstrap the right Drupal site. Site Aliases ------------ -Drush lets you run commands on a remote server, or even on a set of remote -servers. Once defined, aliases can be referenced with the @ nomenclature, i.e. +Drush lets you run commands on a remote server. Once defined, aliases can be referenced with the @ nomenclature, i.e. ```bash # Run pending updates on staging site. $ drush @staging updatedb # Synchronize staging files to production $ drush rsync @staging:%files/ @live:%files -# Synchronize database from production to dev, excluding the cache table -$ drush sql-sync --structure-tables-key=custom @live @dev +# Synchronize database from production to local, excluding the cache table +$ drush sql:sync --structure-tables-key=custom @live @self ``` -See [example.aliases.drushrc.php](https://raw.githubusercontent.com/drush-ops/drush/8.x/examples/example.aliases.drushrc.php) for more information. +See [example.site.yml](https://raw.githubusercontent.com/drush-ops/drush/master/examples/example.site.yml) for more information.