config:set¶
Save a config value directly. Does not perform a config import.
Examples¶
config:set system.site name MySiteconfig:set user.role.anonymous permissions '[]'config:set system.site name 'NULL'config:set system.performance css.preprocess falseconfig:set --input-format=yaml system.site page {403: '403', front: home}config:set --input-format=yaml user.role.authenticated permissions [foo,bar]config:set --input-format=yaml user.role.authenticated ? "{label: 'Auth user', weight: 5}"config:set cat tmp.yml | drush config:set --input-format=yaml user.mail ? -
Arguments¶
- config_name. The config object name, for example system.site.
- 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. The words true, false and null are saved as those typed values, not as strings. Use - to read from stdin.
Options¶
- --input-format=INPUT-FORMAT. Format to parse the value: string or yaml. Since JSON is a subset of YAML, the value may be in JSON format. [default: string]
Global Options¶
- -h, --help. Display help for the given command. When no command is given display help for the list command
- --silent. Do not output any message
- -q, --quiet. Only errors are displayed. All other output is suppressed
- -v|vv|vvv, --verbose. Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
- -V, --version. Display this application version
- --ansi. Force (or disable --no-ansi) ANSI output
- --no-ansi. Negate the --ansi option.
- -n, --no-interaction. Do not ask any interactive question
- --url=URL. A base URL (e.g. example.com). Used for building links, selecting a multi-site, etc.
- -e, --env=ENV. The Environment name. [default: prod]
- --no-debug. Switches off debug mode.
Aliases¶
- cset
- config-set
Legend
- 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.