Skip to content

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

CommandWhat it does
activate [<key>]Saves the key and activates this site. With no key, it reads SUBSET_LICENSE_KEY.
statusShows the saved licence as last checked. Makes no request.
checkAsks us about the licence again, then shows it.
deactivateFrees 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.

CommandWhat it doesPlugin
generateCreates missing size files.Free
clean-orphansDeletes size files no registered size uses.Free
statsShows registered sizes, the files on disk and the space they use.Free
self-testChecks whether requests for missing size files reach WordPress.Free
settings list, get, set, resetReads and changes the plugin’s settings.Free
prewarmVisits the home page and sitemap URLs and creates the sizes they use.Pro
auditShows which sizes your pages use, and can delete the unused ones.Pro
formats backfillMakes the AVIF and WebP copies existing images are missing.Pro
placeholders generateBuilds the blur-up and dominant-colour placeholders.Pro
sign <image>Prints a signed transform URL.Pro
formats, placeholders, watermark settingsReads 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.

CommandWhat it doesPlugin
exportPrints the settings as JSON, or writes them to a file.Free
importImports settings from a JSON file or standard input.Free
servicesLists services and custom rules, and whether each is on.Free
enable, disableSwitches services on or off.Free
checkFetches a page and lists the scripts Subset Opt-Out would hold.Free
rules list, add, removeManages custom blocking rules.Free
settings list, get, set, resetReads and changes the plugin’s settings.Free
opt-in get, on, offShows and switches opt-in mode, for everyone or chosen regions.Pro
regions list, get, setChooses which US states see the opt-out link and notice bar.Pro
optout-log list, export, purgeLists, 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.

CommandWhat it doesPlugin
redirect list, add, update, deleteManage redirects, with the same validation as the admin screen.Free
redirect enable, disableTurn redirects on or off.Free
redirect test <url>Shows what a visit to a URL does.Free
redirect import, exportImport or export redirects as CSV.Free
redirect import-from <plugin>Imports from Redirection, Yoast or Rank Math.Free
404 list, ignore, resolve, reopenRead the 404 log and act on its entries.Free
404 delete, clear, pruneTidy the 404 log.Free
404 ignore-patterns list, add, removeManage the paths that aren’t logged as 404s.Free
settings list, get, set, resetRead and change the plugin’s settings.Free
statsShows how often redirects are used.Pro
chains flattenPoints each chain straight at its final page.Pro
suggestions list, acceptLists and accepts suggested redirects for open 404s.Pro
server-rules apache|nginxPrints your redirects as Apache or nginx rules.Pro

Subset Clone

wp subset duplicator. Every option and example is on Subset Clone WP-CLI commands.

CommandWhat it doesPlugin
duplicate <id>... --userDuplicates posts as a user, with the same permission check as the buttons.Free
settings list, get, set, resetReads and changes the plugin’s settings.Free
duplicate --to-siteCopies to another site on the network. See Copy to another site.Pro
cross-site settings list, get, set, resetReads 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.

CommandWhat it doesPlugin
connection-info, allow, connectionsShow this site’s connection info, allow push or pull, save remotes.Free
key regenerateReplaces this site’s connection key.Free
push, pull, diffMove a database to or from another site, or compare them.Free
export, importWrite or load a database file.Free
status, resume, cancelFollow, resume or stop the current job.Free
backups, restore, historyList and restore backups, and list past migrations.Free
settings list, get, set, resetRead and change the plugin’s settings.Free
filesPush or pull themes and plugins, and manage file transfers.Pro
scheduleBack 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.

CommandWhat it doesPlugin
check <id>Shows a post’s rendered title, description, robots and checks.Free
meta list, get, set, wipeReads, sets or removes a post’s, term’s or user’s SEO values.Free
importImports from Yoast, Rank Math, AIOSEO or SEOPress.Free
sitemap list, flushLists the sitemaps or flushes their cache.Free
settingsReads and changes settings, or exports and imports them as JSON.Free
generateWrites titles and descriptions in bulk, kept for review.Pro
audit run, status, listRuns the site audit and lists posts that break its rules.Pro
links rebuild, status, orphansBuilds the internal link index and lists orphaned posts.Pro
videos scanFinds videos in published posts.Pro
sitemaps, local, woocommerce settingsReads 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.

CommandWhat it doesPlugin
mapRuns a file through your provider and prints the rows as JSON. Nothing is saved.Free
provider list, get, setLists, shows and chooses the AI provider and its model.Free
key set, delete, testSaves, removes and tests provider API keys.Free
wp subset content-builder-pro importTurns 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.