wp_set_option
Sets a WordPress option value with dry-run default and verifies the written value, requiring REST transport and admin credentials.
Instructions
Write ANY wp_options row - including siteurl/home, where a wrong value can take the site offline.
There is NO allowlist here: this reaches every option a plugin or theme reads,
including the ones that decide where WordPress thinks it lives. Setting siteurl
or home to a wrong value takes the site offline and locks you out of wp-admin
(recovery needs database or wp-config access, not this server). Treat unfamiliar
options the same way - many are serialized plugin settings where a partial write
corrupts the whole structure. READ IT FIRST with wp_get_option and keep the old
value. The dry-run preview shows the option's CURRENT value next to the new one so
an overwrite is visible before it happens. DEFAULTS TO dry_run=true (writes
nothing). Pass dry_run=false to write - the write is verified by re-reading the
option, tolerating WordPress's storage casts (25 vs '25', true vs 1, '&' escaped to
'&'), and the result carries the site's ACTUAL stored value next to what you
requested. Requires the REST transport, wp-ops-connect 1.3.0+ and an administrator
app password. Prod writes require allow_prod=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | Yes | ||
| dry_run | No | ||
| install | Yes | ||
| allow_prod | No |