variable-set

Set a variable.

drush variable-set

Aliases:

Arguments:

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:

--yes : Skip confirmation if only one variable name matches.
--exact : The exact name of the variable to set has been provided; do not prompt for similarly-named variables.

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 -