drush variable-setfor drush 8x
Set a variable.
drush variable-set
-
Aliases
variable-set has 1 alias/es:
drush vset
-
Arguments
variable-set accepts 2 argument/s:
name : The name of a variable or the first few letters of its name.
value : The value to assign to the variable. Use '-' to read the object from STDIN.
-
Options
variable-set accepts 4 option/s:
--yes : Skip confirmation if only one variable name matches.
--always-set
--always-set : always-set
--exact : The exact name of the variable to set has been provided; do not prompt for similarly-named variables.
--format
--format : format
-
Examples
Set the preprocess_css variable to true. Skip confirmation if variable already exists.
drush vset --yes preprocess_css TRUE
Take the site offline; skips confirmation even if maintenance_mode variable does not exist. Variable is rewritten to site_offline for Drupal 6.
drush vset --exact maintenance_mode 1
Choose from a list of variables beginning with "pr" to set to (bool)true.
drush vset pr TRUE
Set a variable to a complex value (e.g. array)
php -r "print json_encode(array('drupal', 'simpletest'));" | drush vset --format=json project_dependency_excluded_dependencies -
-
Comments
comments powered by Disqus