Inspect tweak status with WP-CLI
Use the POM Tweaks WP-CLI commands to discover exact tweak slugs, list active tweaks on one site, check one tweak in shell scripts, or find its use across a multisite network. The commands report installed POM Framework modules. Removed classic components are not part of the runtime catalog.
Intended reader
This reference is for site owners, developers, and administrators who can run WP-CLI in the WordPress installation. The commands are read-only: they do not enable, disable, or reconfigure tweaks.
The separate pomtweaks composite-products command family includes write-capable migration, rollback, and cleanup operations for recognized earlier POM data. Its status, diagnose, and dry-run subcommands remain read-only, and the retired runtime is never loaded. Follow the POM Composite Products upgrade guide before using that family.
Prerequisites
- Install and activate POM Tweaks for the target site or network.
- Run WP-CLI from the WordPress directory, or supply the global
--path=<wordpress-path>argument. - On multisite, always select the intended site with
--url=<site-url>when usinglistoris-active.
Discover tweak slugs
List every installed module slug on the selected site:
wp pomtweaks list --status=all --field=slug --url=https://example.com
The default list command shows active tweaks only:
wp pomtweaks list --url=https://example.com
Its table contains:
slug: the exact value accepted by the other commands.status:activeorinactivefor the selected site.type:modern, identifying the POM Framework runtime.
The optional --type accepts all (the default) or modern; both select the current catalog. --type=legacy is no longer accepted because the classic runtime has been removed. The former classic settings migration and cleanup commands are no longer included. Use --status=inactive to inspect only disabled tweaks. The --format argument accepts table, csv, json, yaml, or count; --fields selects several columns and --field prints one column without a table.
WP-CLI generates the complete option reference from the command itself:
wp help pomtweaks list
Check one site
Pass the discovered slug to is-active:
wp pomtweaks is-active image-optimizer --url=https://example.com
On multisite, the Updates → Update controls and Themes → Theme controls modules report the current network policy even when --url selects a subsite. Their state comes from Network Admin; individual site copies do not override it. On standalone WordPress, their state belongs to the selected site.
Existing scripts can continue to supply --type=modern:
wp pomtweaks is-active woocommerce-composite-products --type=modern --url=https://example.com
The command exits with status 0 when the tweak is active. It exits with status 1 and explains whether the tweak is inactive or unknown otherwise. This makes it suitable for shell conditions:
if wp pomtweaks is-active image-optimizer --url=https://example.com --quiet; then
echo "Image optimization is enabled."
fi
Find use across a multisite network
find_usage searches every site in the current network and returns only the sites where the supplied slug is active:
wp pomtweaks find_usage --tweak=image-optimizer
The optional --type=modern selects the same current runtime catalog as the default --type=all.
The output includes the blog ID, site name, complete site URL, and tweak type. Machine-readable output and field selection are also available:
wp pomtweaks find_usage --tweak=login-registration --field=site_url
wp pomtweaks find_usage --tweak=wp-admin-appearance --format=json
This network command exits with status 1 when the slug is unknown, when no site has it active, or when the installation is not multisite. It reads sites in bounded batches, so the result is not limited to the first page of a large network.
Diagnose POM Composite Products
Use the site-scoped read-only diagnostic after activation, migration, import, or catalog maintenance:
wp pomtweaks composite-products diagnose --url=https://example.com
The result reports whether the modern setting matches its five runtime layers, whether the official WooCommerce Composite Products extension is active, installed but inactive, or absent, the supported configuration and migration schema versions, migration counts, POM and classic composite counts, and saved-configuration issues. The product scan validates current schemas, editor and rule contracts, reusable relationships, component integrations, and referenced products, variations, categories, and images. It reports product IDs and machine-readable issue codes, not product names, customer content, request payloads, credentials, or other personal data.
The scan reads products in batches and stops at 500 modern products by default. Adjust the bounded scan when the selected site is larger:
wp pomtweaks composite-products diagnose \
--batch-size=200 \
--max-products=2000 \
--details-limit=50 \
--format=json \
--url=https://example.com
--batch-size accepts 1 to 500, --max-products accepts 1 to 5,000, and --details-limit accepts 0 to 100. The command exits 0 after a complete scan without errors, 2 when the selected site cannot be inspected, and 7 when it finds blocking errors or reaches the configured product limit. Warnings are reported without changing the successful exit code. The command never repairs, migrates, deletes, or rewrites product data.
Expected result and verification
- Run
wp pomtweaks list --status=all --url=<site-url>and confirm that the expected slug appears once. - Enable or disable that tweak through its normal POM Tweaks settings interface.
- Run
wp pomtweaks is-active <slug> --url=<site-url>and confirm that its exit status matches the saved state. - On multisite, run
find_usagewith the same slug and confirm that the selected site appears only while the tweak is active. - When Composite Products is enabled, run
pomtweaks composite-products diagnoseand confirmtoggle_isolationispass,scan_truncatedisno, anderrorsis0.
Troubleshooting
- If WP-CLI says the slug is unknown, copy it from
wp pomtweaks list --status=all --field=sluginstead of using the visible settings label. - If a modern tweak remains inactive, confirm that its required plugin is available and that the setting was saved for the same site selected by
--url. - If
find_usageis unavailable on a single-site installation, useis-activeinstead. - If the wrong site is reported, include the exact multisite site URL in
--urlfor site-scoped commands. - If Composite Products reports
prepared,failed,unknown, an abandoned run, or an active lock, use its reportednext_action; do not start cleanup or remove its recovery data manually. - If Composite Products diagnosis reports
incomplete, increase--max-productswithin the 5,000-product hard limit or inspect the catalog in smaller operational scopes. Do not interpret a truncated scan as a clean result. - If
broken_referencesis non-zero, use the product IDs and issue codes indetailsto edit the affected products. The diagnostic intentionally does not expose or repair their stored values.