Skip to content


Save a config value directly. Does not perform a config import.


  • drush config:set name MySite. Sets a value for the key name of config object.
  • drush config:set page.front /path/to/page. Sets the given URL path as value for the config item with key page.front of config object.
  • drush config:set '[]'. Sets the given key to an empty array.
  • drush config:set 'NULL'. Sets the given key to NULL.
  • drush config:set --input-format=yaml user.role.authenticated permissions [foo,bar]. Use a sequence as value for the key permissions of user.role.authenticated config object.
  • drush config:set --input-format=yaml page {403: '403', front: home}. Use a mapping as value for the key page of config object.
  • drush config:set --input-format=yaml user.role.authenticated ? "{label: 'Auth user', weight: 5}". Update two top level keys (label, weight) in the config object.
  • cat tmp.yml | drush config:set --input-format=yaml user.mail ? -. Update the user.mail config object in its entirety.


  • config_name. The config object name, for example
  • key. The config key, for example page.front. Use ? if you are updating multiple top-level keys.
  • value. The value to assign to the config key. Use - to read from Stdin.


  • --input-format[=INPUT-FORMAT]. Format to parse the object. Recognized values: string, yaml. Since JSON is a subset of YAML, $value may be in JSON format. [default: string]

Global Options

  • -v|vv|vvv, --verbose. Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  • -y, --yes. Auto-accept the default for all user prompts. Equivalent to --no-interaction.
  • -l, --uri=URI. A base URL for building links and selecting a multi-site. Defaults to https://default.
  • To see all global options, run drush topic and pick the first choice.


  • cset
  • config-set


  • An argument or option with square brackets is optional.
  • Any default value is listed at end of arg/option description.
  • An ellipsis indicates that an argument accepts multiple values separated by a space.