Skip to main content
Cookbook Content

Bulk delete posts by date, type, or ID with AI

Clear out imports, duplicates, and stale drafts in batches, by date, type, or ID, with the list shown first and the trash as your safety net.

Difficulty Intermediate
Time ~10 min
Tools rest_api, run_wp_cli

Prerequisites

A connected site and a recent backup, since this removes content in bulk.

The prompt
I want to bulk delete some posts on my site. I have already taken a backup before starting.

Here is what should go: [describe the posts, for example "all draft posts dated before 2021," "every post of type events from 2019," or a list of specific post IDs].

First, find every post that matches and show me the full list with ID, title, date, type, and status, so I can check it. Do not delete anything yet.

Once I confirm the list is right, delete those posts to the trash in batches, not permanently, so I can still recover anything I did not mean to remove. Tell me how many went to the trash. Leave the trash in place. I will review it and empty it myself, since emptying the trash is the step that cannot be undone.

Already connected to WPVibe?

Skip the copy-paste. Just ask your AI for the “Bulk delete posts by date, type, or ID with AI” recipe, or describe the task, and WPVibe runs these steps on your own site.

After a bad import, a migration, or a few years of testing, a site quietly fills up with junk posts: duplicate imports, stale drafts, auto-generated pages nobody reads. Clearing them in wp-admin means the bulk-action screen, twenty rows at a time, with no good way to say “everything from before 2021” or “every draft from that one broken import.” So the clutter stays, weighing on your dashboard and your search results.

WPVibe finds the exact posts that match your rule first, by date range, post type, status, or a list of IDs, and shows you the full list before it removes anything. Deletion goes to the trash by default, so a mistake stays recoverable, and it works in batches you confirm rather than one irreversible sweep. You check the list, it deletes to the trash, and it reports back how many went. Emptying the trash, the one step you cannot undo, stays in your hands.

Because this removes content in bulk, take a backup before you start. Paste the prompt below and describe what should go. Always have it show you the matching list and delete to the trash first, then review the trash yourself before you empty it. Save permanent deletion for last, once the backup is in hand and you have confirmed nothing important is in the pile.

Watch the safety net in action

Outcome

The posts you picked are moved to the trash in confirmed batches, recoverable until you empty it, with nothing else touched.