GuidesBulk Content Updates

Bulk Content Updates

Update hundreds of WordPress pages with AI using Respira: preview with a dry run, run up to 100 pages at a time, and restore any page from its snapshot.

Bulk Content Updates

To change many WordPress pages with AI, list the pages, write one exact rule, preview it with a dry run, then run it in batches of up to 100 pages. Respira takes a snapshot of each page before it writes, so any page can be put back on its own.

The right tool depends on where the content is stored and how many pages you are changing.

Pick the tool

The jobToolWhere the write lands
Change text across many pages whose content is in the WordPress editor fieldwordpress_bulk_pages_operationOn the page itself, after a snapshot
Change several elements on one builder pagewordpress_batch_updateOn a draft duplicate by default
Change one page or postwordpress_update_page or wordpress_update_postOn a draft duplicate by default
Change one module on a builder pagewordpress_update_moduleOn a draft duplicate by default

wordpress_bulk_pages_operation does not create duplicates. It changes the pages themselves, so the dry run is your review step and the snapshots are your way back.

Check where your content lives first

find_and_replace and the first pass of strip_inline_styles work on post_content, the WordPress editor field.

  • Works: the block editor, the classic editor, and builders that keep their content in that field, such as Divi and WPBakery.
  • Does not match: builders that keep their content in post meta, such as Elementor and Bricks. A find_and_replace run reports No matches found in post content on those pages and changes nothing.

For those builders, make the change page by page with wordpress_extract_builder_content, wordpress_find_element and wordpress_batch_update.

The workflow

Step 1: Inventory what exists

Save the list of IDs. It defines the scope of the run, and it is the list you will check at the end.

Step 2: Write one exact rule

Good rules name the exact text:

  • Replace "Book a call" with "Schedule a call"
  • Replace the old street address with the new one
  • Change the button text "Learn More" to "Get Started"

"Make the calls to action stronger" is not a rule. It needs a decision on each page, so use the single-page tools and review each draft.

Step 3: Preview with a dry run

{
  "page_ids": [12, 45, 78],
  "operation": {
    "type": "find_and_replace",
    "options": { "find": "Book a call", "replace": "Schedule a call" }
  },
  "options": { "dry_run": true }
}

A dry run writes nothing, takes no snapshot and does not count against the rate limit. Each page comes back with the status preview and the number of matches. Read those numbers. A page with far more matches than you expected usually means the phrase also appears somewhere you did not intend.

Step 4: Run it

Send the same call without dry_run. The tool is marked destructive, so the first call may answer with respira_approval_required and a one-time token. That question is for the person: the agent shows the predicted effect, asks, and sends the token back only after a yes.

Each page in the result reports its status, its changes and its snapshot_id. A failure on one page does not stop the others, so check failed as well as succeeded.

Step 5: Verify

Open a few of the changed pages, then re-run your checks:

To undo a page, restore the snapshot named in its result with wordpress_restore_snapshot.

Limits, and how to plan around them

  • 100 pages per call. More than that is refused.
  • 20 write runs per hour, per API key. Dry runs do not count.
  • One write run at a time. A second run is refused with respira_bulk_in_progress until the first finishes.

At those limits the most a single key can write is 2,000 pages an hour. For thousands of pages, split the IDs into batches of 100 and check the first batch before you send the rest.

Several replacements in one call use one run:

{
  "page_ids": [12, 45, 78],
  "operation": {
    "type": "find_and_replace",
    "options": {
      "find": ["Book a call", "Learn More"],
      "replace": ["Schedule a call", "Get Started"]
    }
  }
}

Replacements apply in order, so a later one sees the result of an earlier one. A replacement with no matches is not an error: it reports 0 occurrences. Set "regex": true in the options to treat each find as a regular expression.

What happens to each page

  1. Respira takes a snapshot of the page.
  2. It applies the operation.
  3. It reads the page back and compares the stored content with what it meant to write. If they differ, it puts the original content back and marks that page as failed.
  4. After the whole run, it purges caches once.

Example prompt

I want to replace "Book a call" with "Schedule a call" across my WordPress pages.

1) List all published pages.
2) Run wordpress_bulk_pages_operation as a dry run on those page IDs.
3) Show me a table of page ID, title and number of matches. Stop there.
4) After I say yes, run it for real in batches of 100.
5) Show me which pages changed, which failed, and each snapshot ID.

Change nothing else. If a page uses Elementor or Bricks, list it separately instead of editing it.

See also