[00] WP-CLI, For developers
Command reference
Last updated
Every command under wp subset, grouped by plugin, with what each one does, whether it needs Pro, and a link to each plugin's full WP-CLI page.
This page lists every command the Subset plugins add to WP-CLI, grouped by plugin. A plugin’s commands appear once it’s active, and a Pro command once its add-on is active. Each plugin’s section links to its own WP-CLI page, which lists every option, default and example. On your site, wp help subset <plugin> <command> prints the same text.
Licences
Each Pro add-on adds wp subset license <product>, where <product> is image-resizer, cookie-manager, content-builder, redirector, duplicator, migration or seo.
| Command | What it does |
|---|---|
activate [<key>] | Saves the key and activates this site. With no key, it reads SUBSET_LICENSE_KEY. |
status | Shows the saved licence as last checked. Makes no request. |
check | Asks us about the licence again, then shows it. |
deactivate | Frees this site’s slot and removes the key. If we can’t be reached, the key is still removed and you can free the slot from your account. |
status and check take --format=table, json or yaml, and print the product, plugin, status, masked key, expiry date and when it was last checked.
SUBSET_LICENSE_KEY=subset_… wp subset license seo activate
wp subset license seo check --format=json
Subset Sizes
wp subset image-resizer. Every option and example is on Subset Sizes WP-CLI commands. The Pro commands need an active licence as well as the add-on.
| Command | What it does | Plugin |
|---|---|---|
generate | Creates missing size files. | Free |
clean-orphans | Deletes size files no registered size uses. | Free |
stats | Shows registered sizes, the files on disk and the space they use. | Free |
self-test | Checks whether requests for missing size files reach WordPress. | Free |
settings list, get, set, reset | Reads and changes the plugin’s settings. | Free |
prewarm | Visits the home page and sitemap URLs and creates the sizes they use. | Pro |
audit | Shows which sizes your pages use, and can delete the unused ones. | Pro |
formats backfill | Makes the AVIF and WebP copies existing images are missing. | Pro |
placeholders generate | Builds the blur-up and dominant-colour placeholders. | Pro |
sign <image> | Prints a signed transform URL. | Pro |
formats, placeholders, watermark settings | Reads and changes one Pro tab’s settings. | Pro |
Subset Opt-Out
wp subset cookie-manager. Every option and example is on Subset Opt-Out WP-CLI commands.
| Command | What it does | Plugin |
|---|---|---|
export | Prints the settings as JSON, or writes them to a file. | Free |
import | Imports settings from a JSON file or standard input. | Free |
services | Lists services and custom rules, and whether each is on. | Free |
enable, disable | Switches services on or off. | Free |
check | Fetches a page and lists the scripts Subset Opt-Out would hold. | Free |
rules list, add, remove | Manages custom blocking rules. | Free |
settings list, get, set, reset | Reads and changes the plugin’s settings. | Free |
opt-in get, on, off | Shows and switches opt-in mode, for everyone or chosen regions. | Pro |
regions list, get, set | Chooses which US states see the opt-out link and notice bar. | Pro |
optout-log list, export, purge | Lists, exports and purges the opt-out request log. | Pro |
Subset Redirects
wp subset redirector. Every option and example is on Subset Redirects WP-CLI commands.
| Command | What it does | Plugin |
|---|---|---|
redirect list, add, update, delete | Manage redirects, with the same validation as the admin screen. | Free |
redirect enable, disable | Turn redirects on or off. | Free |
redirect test <url> | Shows what a visit to a URL does. | Free |
redirect import, export | Import or export redirects as CSV. | Free |
redirect import-from <plugin> | Imports from Redirection, Yoast or Rank Math. | Free |
404 list, ignore, resolve, reopen | Read the 404 log and act on its entries. | Free |
404 delete, clear, prune | Tidy the 404 log. | Free |
404 ignore-patterns list, add, remove | Manage the paths that aren’t logged as 404s. | Free |
settings list, get, set, reset | Read and change the plugin’s settings. | Free |
stats | Shows how often redirects are used. | Pro |
chains flatten | Points each chain straight at its final page. | Pro |
suggestions list, accept | Lists and accepts suggested redirects for open 404s. | Pro |
server-rules apache|nginx | Prints your redirects as Apache or nginx rules. | Pro |
Subset Clone
wp subset duplicator. Every option and example is on Subset Clone WP-CLI commands.
| Command | What it does | Plugin |
|---|---|---|
duplicate <id>... --user | Duplicates posts as a user, with the same permission check as the buttons. | Free |
settings list, get, set, reset | Reads and changes the plugin’s settings. | Free |
duplicate --to-site | Copies to another site on the network. See Copy to another site. | Pro |
cross-site settings list, get, set, reset | Reads and changes the network’s cross-site settings. | Pro |
The Pro commands exist only on multisite.
Subset Sync
wp subset sync. Every option and example is on Subset Sync WP-CLI commands.
| Command | What it does | Plugin |
|---|---|---|
connection-info, allow, connections | Show this site’s connection info, allow push or pull, save remotes. | Free |
key regenerate | Replaces this site’s connection key. | Free |
push, pull, diff | Move a database to or from another site, or compare them. | Free |
export, import | Write or load a database file. | Free |
status, resume, cancel | Follow, resume or stop the current job. | Free |
backups, restore, history | List and restore backups, and list past migrations. | Free |
settings list, get, set, reset | Read and change the plugin’s settings. | Free |
files | Push or pull themes and plugins, and manage file transfers. | Pro |
schedule | Back up the database on a schedule. | Pro |
The old wp migration group still runs the database commands, with a deprecation warning, until Subset Sync 1.0. It doesn’t include key, settings or the Pro commands.
SEO
wp subset seo. Every option and example is on Subset SEO WP-CLI commands.
| Command | What it does | Plugin |
|---|---|---|
check <id> | Shows a post’s rendered title, description, robots and checks. | Free |
meta list, get, set, wipe | Reads, sets or removes a post’s, term’s or user’s SEO values. | Free |
import | Imports from Yoast, Rank Math, AIOSEO or SEOPress. | Free |
sitemap list, flush | Lists the sitemaps or flushes their cache. | Free |
settings | Reads and changes settings, or exports and imports them as JSON. | Free |
generate | Writes titles and descriptions in bulk, kept for review. | Pro |
audit run, status, list | Runs the site audit and lists posts that break its rules. | Pro |
links rebuild, status, orphans | Builds the internal link index and lists orphaned posts. | Pro |
videos scan | Finds videos in published posts. | Pro |
sitemaps, local, woocommerce settings | Reads and changes one Pro tab’s settings. | Pro |
Subset Fill
wp subset content-builder. Every option and example is on Subset Fill WP-CLI commands.
| Command | What it does | Plugin |
|---|---|---|
map | Runs a file through your provider and prints the rows as JSON. Nothing is saved. | Free |
provider list, get, set | Lists, shows and chooses the AI provider and its model. | Free |
key set, delete, test | Saves, removes and tests provider API keys. | Free |
wp subset content-builder-pro import | Turns a Word file or web page into the HTML the Build box would use. | Pro |
The old wp sfcb map still works but prints a deprecation warning.