Delete Old Comments by Post Type with AI
Count the comments on the content types you name, back up, then delete them with Disable Comments, never touching order notes.
Prerequisites
A site connected to WPVibe running Disable Comments 2.9 or newer (tested on 2.9.0, the free plugin) on WordPress 6.9 or newer. Take a backup first: deleted comments cannot be recovered.
My WordPress site uses the Disable Comments plugin. Delete the existing comments on my [content types, for example posts and pages].
1. Run discover_abilities with category disable-comments. If the ability this needs is not there, stop and tell me to install or update the free Disable Comments plugin (2.9 or newer, on WordPress 6.9 or newer).
2. Run disable-comments/get-status. If is_network_active is true, stop and tell me this recipe does not cover multisite networks.
3. Count every comment by content type and comment type with run_wp_cli: db query "SELECT p.post_type, c.comment_type, COUNT(*) AS n FROM {prefix}comments c LEFT JOIN {prefix}posts p ON p.ID = c.comment_post_ID GROUP BY p.post_type, c.comment_type". Show me the table. Rows of type order_note are WooCommerce order notes and must never be deleted. If any row on the types I named has a comment type other than blank, comment, pingback, trackback or review (for example note, the block editor's notes, or another plugin's data), name it and tell me it would be deleted too, unless that type is in allowed_comment_types from step 2, which the delete keeps. Then wait for me.
4. Never use mode everywhere: it deletes every row in the comments table, WooCommerce order notes included. Run disable-comments/delete-comments with mode post_types, the content types I named (from available_post_types), and dry_run true. If WPVibe returns an approval link, give it to me, wait until I approve, and read the result with check_approval_status.
5. Tell me the matched number, that it includes spam, pingbacks and comments on trashed items of those types, and that deletion is permanent with no trash. If product is one of them, tell me the products' star ratings may still show until WooCommerce recounts them. Ask me to take a backup first and wait for my yes.
6. On my yes, run disable-comments/delete-comments with the same mode and content types, dry_run false and confirm true. If WPVibe returns an approval link, give it to me and read the result with check_approval_status once I approve.
7. Run the count from step 3 again and show me before and after side by side. Only rows on the content types I named should have changed; if anything else changed, say so first.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Delete Old Comments by Post Type with AI” recipe from the WPVibe cookbook on my connected site.
Turning comments off hides the old ones, but they stay in your database: years of spam on attachments, pingbacks on old posts, a comment section you closed long ago. Some sites want them gone for good.
The AI counts the comments on the content types you name, by kind, and shows you the number before anything happens. It deletes only after your yes and a backup, then counts again so you can see what changed.
This uses Disable Comments’ “by post type” mode on purpose. Its “everywhere” mode deletes every row in the comments table, and on a WooCommerce store that includes order notes: in our test it removed all 200. A delete by post type also removes block editor notes and anything another plugin stores as comments on those types, unless Disable Comments’ allowlist keeps them, so the AI stops and asks if it finds any. Deletion is permanent, with no trash, and WPVibe asks for your approval in the browser before it runs, unless you approved it for the session. Only cleaning out spam? This recipe does that without a plugin.
Outcome
The comments on the content types you chose are deleted, and a count before and after shows nothing else changed.