drush state:setfor drush 9x
Set a state value.
drush state:set
-
Aliases
state:set has 2 alias/es:
drush sset
drush state-set
-
Arguments
state:set accepts 2 argument/s:
key* : The state key, for example: system.cron_last.
value* : The value to assign to the state key. Use '-' to read from STDIN.
-
Options
state:set accepts 5 option/s:
--input-format
--input-format : input-format
--value
--value : value
--notify
--notify : notify
--druplicon
--druplicon : druplicon
--xh-link
--xh-link : xh-link
-
Examples
Put site into Maintenance mode.
drush sset system.maintenance_mode 1 --input-format=integer
Sets a timestamp for last cron run.
drush state:set system.cron_last 1406682882 --input-format=integer
Set a key to a complex value (e.g. array)
php -r "print json_encode(array(\'drupal\', \'simpletest\'));" | drush state-set --input-format=json foo.name -
-
Comments
comments powered by Disqus