wp_create_page: create a page
Creates a page. Identical to wp_create_post with the post type fixed to page.
Arguments
| Argument | Default | Meaning |
|---|---|---|
title |
— | The title |
content |
— | The body |
excerpt |
— | The excerpt |
slug |
— | The slug; derived from the title when omitted |
status |
draft |
The page status |
dry_run |
— | Report without creating |
Permissions
Allow content writes open, and the edit_pages capability — not edit_posts. Creating pages is a higher bar than creating posts in standard WordPress roles.
Scopes: mcp:read, mcp:write, wp:content:read, wp:content:write.
Mechanics
The draft default, the dry run and field handling are as described in wp_create_post.
The rest of this page is about what makes creating a page different.
Builder content must be composed properly
A page created with plain text renders as plain text. A POM builder page needs valid shortcode structure, which means the authoring tools first:
pom_get_authoring_contextpom_get_available_shortcodespom_get_shortcode_schemafor each one used- Compose
pom_validate_builder_content- Then create
The tool stores whatever content you send without validating it, so an unvalidated page is stored happily and renders wrongly. See Build POM builder content.
What it does not set
Creating a page sets the fields above and nothing else:
- no parent, so a new page is top level regardless of where it belongs in the structure;
- no page template;
- no menu entry — see Edit a navigation menu;
- no featured image;
- no meta or SEO fields.
The parent is the one that surprises people. A page intended to sit under Services is created at the top level, with a top-level URL, and moving it afterwards changes that URL.
Read back the derived slug
Create a draft page titled "Maintenance services" with this content: … Give me the ID and the slug it derived.
The slug matters more for a page than for a post, because it becomes a top-level public URL the moment the page is published — and changing it later breaks whatever already links to it. Check it while the page is still a draft and nothing depends on it.
Common problems
| Symptom | Cause |
|---|---|
| The write is refused | Content write gate closed |
pom_ai_mcp_forbidden |
No edit_pages capability |
| The page is at the top level | No parent is set on creation |
| The URL is not what you wanted | The slug was derived from the title |
| It renders as plain text | Builder content was not composed or validated |
| It is not in the menu | Menu entries are a separate step |