Skip to content

Import/Export options as (pretty-printed) JSON #512

@vadimkantorov

Description

@vadimkantorov

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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions