mirror of
https://ghproxy.net/https://github.com/wp-cli/handbook.git
synced 2026-07-26 12:37:22 +08:00
1.3 KiB
1.3 KiB
wp option
Retrieves and sets site options, including plugin and WordPress settings.
See the Plugin Settings API and the Theme Options for more information on adding customized options.
COMMON OPTIONS
These are some of the most commonly used WordPress options:
siteurl- Site URL, e.g. http://example.comblogname- Site titleblogdescription- Site taglineadmin_email- Administration email addressdefault_role- Default role for new userstimezone_string- Local timezone, e.g. "America/New_York"home- Home URL, e.g. http://example.comblog_public- Discourage search engines when set to 0
For the full list of available options, see the Option Reference.
EXAMPLES
# Get site URL.
$ wp option get siteurl
http://example.com
# 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.