Simplify your WordPress workflow!
Build faster, cleaner, and more reliable WordPress websites using lightweight plugins designed for real-world workflows.
Get started nowWith PRO, Disable Comments RB adds wp disable-comments-rb commands for scripts, deployments and sites you manage over SSH. Turn them on first under General Settings → WP-CLI → Enable WP-CLI commands for this plugin, then run them in your WordPress folder.
Shows the current configuration as a table: mode, disabled content types, whether new comments are blocked, existing-comment visibility, the date rule, XML-RPC and REST blocking, AI Assistant state and rule count, menu location and the deleted total.
wp disable-comments-rb status
Sets the same fields as the Disable tab.
wp disable-comments-rb set <all|selected|off> [--types=<types>] [--block-new=<on|off>] [--visibility=<all|none|date_range>] [--date-rule=<between|before>] [--from=<date>] [--to=<date>] [--before=<date>]
| Option | Meaning |
|---|---|
--types |
Comma-separated post type slugs; required with selected |
--block-new |
Whether visitors can post new comments; default on |
--visibility |
Existing comments: all (show), none (hide, default) or date_range |
--date-rule |
With date_range: between (default) or before |
--from, --to, --before |
Dates as YYYY-MM-DD |
wp disable-comments-rb set all
wp disable-comments-rb set selected --types=post,page
wp disable-comments-rb set selected --types=post --visibility=date_range --date-rule=before --before=2025-01-01
wp disable-comments-rb set off
On a Multisite network that enforces the settings, set is refused.
Prints the totals by status (including the deleted total) and a table by content type.
wp disable-comments-rb stats
Deletes or trashes comments that match a content type and status filter, like the Delete tab.
wp disable-comments-rb delete --types=<types> --statuses=<statuses> [--date-rule=<between|before|after>] [--from=<date>] [--to=<date>] [--before=<date>] [--after=<date>] [--comment-type=<comment|review>] [--permanent] [--yes]
| Option | Meaning |
|---|---|
--types |
Comma-separated post type slugs |
--statuses |
Comma-separated: approve, hold, spam, trash |
--date-rule and dates |
Only comments in a date window; the date itself is excluded from after |
--comment-type |
comment or review (WooCommerce product reviews); omit for both |
--permanent |
Skip Trash and delete at once — cannot be undone |
--yes |
Skip the confirmation prompt |
wp disable-comments-rb delete --types=post --statuses=spam,trash --permanent --yes
wp disable-comments-rb delete --types=post,page --statuses=trash
wp disable-comments-rb delete --types=post --statuses=approve --date-rule=before --before=2023-01-01
Build faster, cleaner, and more reliable WordPress websites using lightweight plugins designed for real-world workflows.
Get started now