Apply a blueprint
wp_blueprint_applyApply the applicable parts of a blueprint to this site — the write side of wp_blueprint_diff, which returns the same plan read-only together with plan_hash. Dry run by default: without apply=true the answer is the plan and nothing is written. It adds what is missing; only with update_existing does it change what exists here but differs: settings, terms and pages are overwritten, and an existing menu gets the items it lacks, where an item whose label or parent differs is added beside the old one and notes say so. It never deletes, deactivates or removes anything, and structure here that the blueprint lacks is left alone. A repeated run writes only what earlier runs left undone (max_writes reached, a failed row, updates without update_existing); what they applied shows as unchanged. Applied: settings (allow-listed fields; each write records an undo point where one can be kept), terms, pages (title, slug, status and parent only; a row carrying content, post_content or body is refused, any other field this build does not write is named under "unwritten_fields" on its row and counted as "not_written", and where this site fills post_content for new posts the result says so under "notes") and menus with their items and theme locations. Advisory only, never applied: post types and taxonomies (they live in plugin or theme code), widgets, plugin activation and theme switches; menu_order and page templates are compared but not written. Every write goes through the ordinary tools, so their permissions, the token's scope and the per-tool switches apply; a section whose tools are off is reported as blocked. With on_error "stop" the first failed write ends the run, and writes made before it stay. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | true writes. false (default): dry run, nothing is written. | |
| session | No | A committed upload session id holding the JSON. | |
| on_error | No | "stop" (default): the first failed write ends the run; "continue": the remaining rows are still written. Writes already made stay either way. | |
| sections | Yes | Sections to apply, required: any of settings, terms, pages and menus. | |
| blueprint | No | The blueprint JSON, inline. Exactly one of blueprint/session. | |
| max_writes | No | Hard cap on writes in one run, 1-2000. Default 200. | |
| expect_hash | No | plan_hash from wp_blueprint_diff; the apply refuses if the state changed since. | |
| allow_partial | No | true accepts sections the export marked truncated. Default false: such sections are refused. | |
| update_existing | No | true also performs "update" rows — things that exist here but differ. Default false: only what is missing is created. Settings always exist, so a settings apply writes nothing without this flag, and the answer says so. |