30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Plan Database Cleanup

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

Abilitylitespeed/plan-database-cleanup
ToolsetLiteSpeed Cache — toolset/litespeed
GroupLiteSpeed Cache › Database Health
RequiresLiteSpeed Cache, active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeWhat it is
planarrayOne row per cleanup type: the count, the ability that performs it, and a safe flag.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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 the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading