-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
command:option-addRelated to 'option add' commandRelated to 'option add' commandcommand:option-listRelated to 'option list' commandRelated to 'option list' commandcommand:option-updateRelated to 'option update' commandRelated to 'option update' command
Description
Currently we can import options, but have to iterate wp option update command invocation for each option.
A convenience command would be helpful which would import all options from a JSON file (e.g. produced with wp option list --format=json).
Currently wp option list --format=json does produce all options in JSON, but unfortunately it's not prettified in any way and dumped in one very-long line. So some prettification options would also be very helpful (and placing default options in the top of the file)
This is useful in setups where WordPress is used as a static-site-generator engine. For this usecase, it's nice to store all options in a plain JSON (or YAML) file and import them into a fresh-new WordPress installation during build.
Metadata
Metadata
Assignees
Labels
command:option-addRelated to 'option add' commandRelated to 'option add' commandcommand:option-listRelated to 'option list' commandRelated to 'option list' commandcommand:option-updateRelated to 'option update' commandRelated to 'option update' command