example.drushrc.php

  1. 6.x examples/example.drushrc.php
  2. 3.x examples/example.drushrc.php
  3. 4.x examples/example.drushrc.php
  4. 5.x examples/example.drushrc.php
  5. master examples/example.drushrc.php

File

examples/example.drushrc.php
View source
  1. <?php
  2. /*
  3. * Examples of valid statements for a drushrc.php file. Use this file to cut down on
  4. * typing of options and avoid mistakes.
  5. *
  6. * Rename this file to drushrc.php and optionally copy it to one of
  7. * five convenient places, listed below in order of precedence:
  8. *
  9. * 1. Drupal site folder (e.g sites/{default|example.com}/drushrc.php).
  10. * 2. Drupal installation root.
  11. * 3. In any location, as specified by the --config (-c) option.
  12. * 4. User's .drush folder (i.e. ~/.drush/drushrc.php).
  13. * 5. System wide configuration folder (e.g. /etc/drush/drushrc.php).
  14. * 6. Drush installation folder.
  15. *
  16. * If a configuration file is found in any of the above locations, it
  17. * will be loaded and merged with other configuration files in the
  18. * search list.
  19. *
  20. * IMPORTANT NOTE on configuration file loading:
  21. *
  22. * At its core, drush works by "bootstrapping" the Drupal environment
  23. * in very much the same way that is done during a normal page request
  24. * from the web server, so most drush commands run in the context
  25. * of a fully-initialized website.
  26. *
  27. * Configuration files are loaded in the reverse order they are
  28. * shown above. Configuration files #6 through #3 are loaded immediately;
  29. * the configuration file stored in the Drupal root is loaded
  30. * when Drupal is initialized, and the configuration file stored
  31. * in the site folder is loaded when the site is initialized.
  32. *
  33. * This load order means that in a multi-site environment, the
  34. * configuration file stored in the site folder will only be
  35. * available for commands that operate on that one particular
  36. * site. Additionally, there are some drush commands such as
  37. * pm-download do not bootstrap a drupal environment at all,
  38. * and therefore only have access to configuration files #6 - #3.
  39. * The drush commands 'rsync' and 'sql-sync' are special cases.
  40. * These commands will load the configuration file for the site
  41. * specified by the source parameter; however, they do not
  42. * load the configuration file for the site specified by the
  43. * destination parameter, nor do they load configuration files
  44. * for remote sites.
  45. */
  46. // DEPRECATED: Allow command names to contain spaces.
  47. // This feature will be removed shortly; drush-3 will
  48. // require commands to be named with dashes instead of
  49. // spaces (e.g. "cache-clear" instead of "cache clear").
  50. // During the transition period, uncomment the line below
  51. // to allow commands with spaces to be used.
  52. # $options['allow-spaces-in-commands'] = 1;
  53. // Specify a particular multisite.
  54. # $options['l'] = 'http://example.com/subir';
  55. // Specify your Drupal core base directory (useful if you use symlinks).
  56. # $options['r'] = '/home/USER/workspace/drupal-6';
  57. // Load a drushrc.php configuration file from the current working directory.
  58. # $options['c'] = '.';
  59. // Specify CVS for checkouts
  60. # $options['package-handler'] = 'cvs';
  61. // Specify CVS credentials for checkouts (requires --package-handler=cvs)
  62. # $options['cvscredentials'] = 'name:password';
  63. // Specify additional directories to search for *.drush.inc files
  64. // Use POSIX path separator (':')
  65. # $options['i'] = 'sites/default:profiles/myprofile';
  66. // Specify additional directories to search for *.alias.drushrc.php
  67. // and *.aliases.drushrc.php files
  68. # $options['alias-path'] = '/path/to/aliases:/path2/to/more/aliases';
  69. // Specify directory where sql-sync will store persistent dump files.
  70. // Keeping the dump files around will improve the performance of rsync
  71. // when the database is rsync'ed to a remote system. If a dump directory
  72. // is not specified, then sql-sync will store dumps in temporary files.
  73. # $options['dump-dir'] = '/path/to/dumpdir';
  74. // Enable verbose mode.
  75. # $options['v'] = 1;
  76. // Show database passwords in 'status' and 'sql-conf' commands
  77. # $options['show-passwords'] = 1;
  78. // Default logging level for php notices. Defaults to "notice"; set to "warning"
  79. // if doing drush development. Also make sure that error_reporting is set to E_ALL
  80. // in your php configuration file. See 'drush status' for the path to your php.ini file.
  81. # $options['php-notices'] = 'warning';
  82. // Specify options to pass to ssh in backend invoke. (Default is to prohibit password authentication; uncomment to change)
  83. # $options['ssh-options'] = '-o PasswordAuthentication=no';
  84. /*
  85. * The output charset suitable to pass to iconv PHP function as out_charset
  86. * parameter. Drush will convert its output from UTF-8 to the charset specified
  87. * here. It is possible to use //TRANSLIT and //IGNORE charset name suffixes
  88. * (see iconv documentation). If not defined conversion will not be performed.
  89. */
  90. # $options['output_charset'] = 'ISO-8859-1';
  91. # $options['output_charset'] = 'KOI8-R//IGNORE';
  92. # $options['output_charset'] = 'ISO-8859-1//TRANSLIT';
  93. /*
  94. * Customize this associative array with your own tables. This is the list of
  95. * tables whose *data* is skipped by the 'sql-dump' and 'sql-sync' commands when
  96. * a structure-tables-key is provided. You may add new tables to the existing
  97. * array or add a new element.
  98. */
  99. $options['structure-tables'] = array(
  100. 'common' => array('cache', 'cache_filter', 'cache_menu', 'cache_page', 'history', 'sessions', 'watchdog'),
  101. );
  102. /*
  103. * Customize this associative array with your own tables. This is the list of
  104. * tables that are entirely omitted by the 'sql-dump' and 'sql-sync' commands
  105. * when a skip-tables-key is provided. This is useful if your database contains
  106. * non Drupal tables used by some other application or during a migration for
  107. * example. You may add new tables to the existing array or add a new element.
  108. */
  109. $options['skip-tables'] = array(
  110. 'common' => array('migration_data1', 'migration_data2'),
  111. );
  112. /*
  113. * Command-specific options
  114. *
  115. * To define options that are only applicable to certain commands,
  116. * make an entry in the 'command-specific' structures as shown below.
  117. * The name of the command may be either the command's full name
  118. * or any of the command's aliases.
  119. *
  120. * Options defined here will be overridden by options of the same
  121. * name on the command line. Unary flags such as "--verbose" are overridden
  122. * via special "--no-xxx" options (e.g. "--no-verbose").
  123. *
  124. * Limitation: If 'verbose' is set in a command-specific option,
  125. * it must be cleared by '--no-verbose', not '--no-v', and visa-versa.
  126. */
  127. # $command_specific['rsync'] = array('verbose' => TRUE);
  128. # $command_specific['dl'] = array('cvscredentials' => 'user:pass');
  129. // Specify additional directories to search for scripts
  130. // Use POSIX path separator (':')
  131. # $command_specific['script']['script-path'] = 'sites/all/scripts:profiles/myprofile/scripts';
  132. /**
  133. * Variable overrides:
  134. *
  135. * To override specific entries in the 'variable' table for this site,
  136. * set them here. Any configuration setting from the 'variable'
  137. * table can be given a new value. We use the $override global here
  138. * to make sure that changes from settings.php can not wipe out these
  139. * settings.
  140. *
  141. * Remove the leading hash signs to enable.
  142. */
  143. # $override = array(
  144. # 'site_name' => 'My Drupal site',
  145. # 'theme_default' => 'minnelli',
  146. # 'anonymous' => 'Visitor',
  147. # );