wp option

See the Plugin Settings API and the Theme Options for more information on adding customized options.


# Get site URL.
$ wp option get siteurl

# Add option.
$ wp option add my_option foobar
Success: Added 'my_option' option.

# Update option.
$ wp option update my_option '{"foo": "bar"}' --format=json
Success: Updated 'my_option' option.

# Delete option.
$ wp option delete my_option
Success: Deleted 'my_option' option.

Top ↑


Name Description
wp option add

Adds a new option value.

wp option delete

Deletes an option.

wp option get

Gets the value for an option.

wp option list

Lists options and their values.

wp option patch

Updates a nested value in an option.

wp option pluck

Gets a nested value from an option.

wp option update

Updates an option value.