litespeed/plan-database-cleanup reports, for each cleanup LiteSpeed tracks, how many rows it would affect and which ability can actually perform it.
It plans. It does not delete.
At a glance
| Ability | litespeed/plan-database-cleanup |
| Toolset | LiteSpeed Cache — toolset/litespeed |
| Group | LiteSpeed Cache › Database Health |
| Requires | LiteSpeed Cache, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
LiteSpeed’s cleanup cannot be triggered from an ability, but the work is all available elsewhere in this plugin. Transients go through cache/delete-expired-transients and cache/flush-transients. Spam, trashed comments and trackbacks go through comments/list-comments and comments/delete-comment. Revisions, trashed posts, auto-drafts and orphaned post meta go through database/delete-db-rows.
The safe flag on each row is the important part. Safe rows go through WordPress APIs, which means the deletion takes the associated data with it — deleting a post through the API removes its meta and its term relationships.
Unsafe rows are raw row deletes. They remove the row you named and leave everything that referenced it: delete a post revision as a row and its post meta stays behind, orphaned, counting toward the next cleanup’s orphaned-meta figure.
So an unsafe route needs a second pass against the postmeta table, and that is worth knowing before starting rather than after. The flag exists so the plan can be read as a plan.
Input
This ability takes no input.
What comes back
| Name | Type | What it is |
|---|---|---|
plan | array | One row per cleanup type: the count, the ability that performs it, and a safe flag. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
How do I actually clean up this database?
It resolves to one call:
{
"ability": "litespeed/plan-database-cleanup",
"parameters": {}
}Worth knowing
- Read-only — it plans, it does not delete.
- Unsafe routes are raw row deletes and leave post meta behind.
- Take a backup before acting on any of it.
- Small counts are not worth acting on.
Related abilities
- Get Database Cleanup Summary — the counts alone
- List MyISAM Tables — a different database problem
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category