Search WordPress Content
wordpress_search_contentFinds the WordPress posts/pages that contain an EXACT string (or regex) in their content or title — the precise search wordpress_list_posts(search=...) cannot do, because WordPress' own search is fuzzy and word-tokenised (it matches a shortcode like [vc_column_text] on every WPBakery page, and misses bracketed or punctuated tokens). Use it to locate a stale phone number, an outdated claim, or a broken shortcode across a whole site before fixing it, then feed the returned ids to wordpress_bulk_replace. search_in = "content" (default) | "title" | "both". regex=true treats query as a Python regular expression; otherwise it is a literal, case-sensitive substring. type filters post types ("page", "post" or "page,post"; empty scans both). status defaults to "publish". It scans up to max_scan posts (hard cap 400), newest-first, and tells you if the site has more than that. Every post is fetched one by one (~1 s each on a typical host), so one call stops after about 110 seconds and returns what it found so far with partial=true and next_offset; call again with offset=next_offset (same other arguments) to continue where it stopped. Each hit returns id, slug, title, type, match_count and a short snippet around the first match; the hit list is capped so the result stays small. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| query | Yes | ||
| regex | No | ||
| offset | No | ||
| status | No | publish | |
| max_scan | No | ||
| site_url | No | ||
| search_in | No | content |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||