---
name: wordpress-content-refresh
description: Use when asked to refresh stale content on a WordPress site connected via Cowboy MCP — finds aging posts, audits them, and updates copy behind a database checkpoint, setting alt text on any new images it uploads.
---

# WordPress content refresh

Find aging or thin content on a WordPress site through Cowboy MCP, then bring it up to date safely. Read and audit first, take a checkpoint before any edit, and update one post at a time so every change is easy to review and undo.

## Before you start

1. Confirm the connection is healthy: call `wp_site_info`.
2. Agree on what "stale" means for this site — for example, posts not modified in over a year, or a specific category.
3. Create a database checkpoint with `wp_create_checkpoint` (label it "content-refresh") and confirm it exists with `wp_list_checkpoints` before making any edit.

## Steps

1. **Find stale posts (read-only).** Call `wp_list_posts` with `orderby: modified` and `order: ASC` to surface the least-recently-updated posts. Filter by `post_type`, `category`, or `status` as agreed. Note thin posts and forgotten drafts.
2. **Read before you write (read-only).** For each candidate, call `wp_get_post` to read the full content, excerpt, terms, and meta so you refresh from the real current state.
3. **Audit media (read-only).** Call `wp_list_posts` with `post_type: attachment`, then read each image with `wp_get_post` and flag any whose `_wp_attachment_image_alt` meta is empty. (See Notes — this toolset writes alt text on upload, not retroactively.)
4. **Refresh the copy.** Call `wp_update_post` for one post: update `content`, `excerpt`, tags, and categories, and set `status` (for example, keep it a draft while you work, then publish). Only the fields you pass change.
5. **Add images with alt text.** If the refresh needs a new image, call `wp_upload_media` and pass `alt_text` so the new attachment ships accessible from the start.
6. **Verify.** Re-read the post with `wp_get_post` and confirm the changes landed as intended.

## Notes

- `dry_run` applies to write tools only; `wp_list_posts` and `wp_get_post` are read-only and reject it — call them directly.
- Alt text on existing library images: the alt value lives in the underscore-protected meta key `_wp_attachment_image_alt`, which MCP will not write through `wp_update_post`. So the audit reports missing alt text, but the fix path here is uploading a fresh image with `alt_text` set, or editing it in the Media Library. New uploads via `wp_upload_media` set alt correctly.
- Every edit is journaled: undo a single post's change with `wp_undo_change`, or restore the whole session with `wp_restore_checkpoint`.

## Report format

Summarize back to the site owner:
- Which posts were refreshed, with their last-modified dates before the pass.
- What changed per post (copy, excerpt, terms, status) and which were left as drafts for review.
- Any new images uploaded, with their alt text.
- Images still missing alt text that need a manual fix.
- The checkpoint id, so the whole pass rolls back with `wp_restore_checkpoint` if needed.
