wp_create_redirect
Create a URL redirect by specifying the source path, target URL, and optional HTTP status code. Enable or disable the redirect to control WordPress site navigation.
Instructions
Create a URL redirect
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": {
"source_path": "<source_path>",
"target_url": "<target_url>"
},
"name": "wp_create_redirect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | No | ||
| target_url | Yes | Target URL | |
| source_path | Yes | Source path e.g. /old-page | |
| status_code | No | 301 |