wp site option add

Adds a site option.

wp site option add <key> [<value>] [--format=<format>]

Options

<key>

The name of the site option to add.

[<value>]

The value of the site option to add. If omitted, the value is read from STDIN.

[--format=<format>]

The serialization format for the value. [Default: plaintext]

Options:
  • plaintext
  • json

Examples

# Create a site option by reading a JSON file $ wp site option add my_option --format=json < config.json Success: Added 'my_option' site option.