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

Start free trial

Purge Posts

litespeed/purge-post purges the cached copies of posts by ID.

It is the call after an edit made outside WordPress, which does not trigger LiteSpeed’s automatic purge.

At a glance

Abilitylitespeed/purge-post
ToolsetLiteSpeed Cache — toolset/litespeed
GroupLiteSpeed Cache › Purging
RequiresLiteSpeed Cache, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

When the automatic purge does not fire

LiteSpeed hooks WordPress’s save events, so editing a post in the admin purges it and the pages it appears on automatically. That covers almost everything — and then there are the writes that do not go through those hooks.

A direct database update, an import, a migration, a plugin writing post meta with update_post_meta() rather than a save — all of them change what a page renders without firing a save event. The page is stale and nothing knows.

Purging by post ID rather than by URL matters because a post appears on more than its own page: the front page, category archives, tag archives, the feed. LiteSpeed’s own post-purge handles those relationships; purging the post URL alone leaves the archives showing the old excerpt.

IDs that do not exist are reported back rather than silently skipped, so a typo does not look like a successful purge.

Input

NameTypeRequiredWhat it is
post_idsarrayYesThe post IDs to purge.

What comes back

NameTypeWhat it is
purgedarrayThe post IDs that were purged.
not_foundarrayIDs that do not exist.
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:

We updated post 412 through the database — clear its cache.

It resolves to one call:

{
  "ability": "litespeed/purge-post",
  "parameters": {
    "post_ids": [412]
  }
}

Worth knowing

  • Purging by ID also clears the archives the post appears on. Purging its URL does not.
  • Unknown IDs are reported, not skipped.
  • Normal admin edits purge automatically — this is for everything else.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading