A command line interface for WordPress

Commands » option

wp option - Manage options.

Quick links: Github issues


# 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.


Name Description
add Add a new option value.
delete Delete an option.
get Get the value for an option.
list List options and their values.
update Update an option value.