database_search_replace
Search and replace in WordPress database (e.g. URL migration).
Handles serialized data safely. Use dry_run=true first to preview changes.
Requires: API key with write scope.
Args: slug: Site identifier old: String to search for (e.g. "http://old-domain.com") new: Replacement string (e.g. "https://new-domain.com") dry_run: Preview only without making changes (default: true)
Returns: {"replacements": 42, "tables_affected": 5, "dry_run": true}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"slug": "<slug>",
"old": "<old>",
"new": "<new>"
},
"name": "database_search_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new | Yes | ||
| old | Yes | ||
| slug | Yes | ||
| dry_run | No |