By Fahad Murtaza · Published · Updated
Save, apply, and move Elementor templates with your AI agent
Elementor’s template library lets you reuse a section, a header, or a whole page layout across your site. WP MCP now gives your AI agent that library: export a page to portable JSON, save a page as a template, apply a template to another page, and import a design from JSON. Every apply is snapshotted, so a layout you drop onto a page is one click from undone.
What you need
- WP MCP installed and connected to your AI client, with its Pro tier active.
- Elementor active. Templates are stored as ordinary
elementor_libraryposts.
Save a page as a reusable template
› Save the current /about layout as a section template called "Team block".
save-as-template copies the page’s element tree into a new library template
of the type you choose (section, header, footer, single, archive, popup, and
more). Because a template is a normal post, you can remove it later with the
standard content tools.
Apply a template to another page
› Add the "Team block" template under the hero on /services.
› Replace the whole /landing page with the "Campaign" template.
apply-template reads the target page first (with an expected hash, so a
concurrent edit is refused rather than clobbered), then copies the template in
with freshly regenerated element ids so nothing collides with what is
already on the page. Append it under a specific container, or use replace mode
to swap the whole page. The write is snapshotted, so undo it per change or per
session with rollback-operation.
Export and import across pages or sites
› Export /pricing as JSON so I can reuse it.
› Import this exported layout as a template called "Pricing v2".
export-page returns a portable envelope: the content tree, the page settings,
and the Elementor version. Hand that envelope to import-template and WP MCP
builds a new library template from it, so a design moves cleanly between pages,
or between two sites running WP MCP.
Why it is safe
Applying a template is the only one of these that changes an existing page, and
it goes through the same snapshot-first path as every other Elementor edit:
_elementor_data is ordinary post meta, captured before the write, so a
template you apply is always reversible.
Common questions
How do I save an Elementor page as a template with AI?
Ask the agent to run save-as-template. It copies the page's element tree into a new elementor_library template of the type you choose, such as section, header, footer, single, archive or popup.
Does applying an Elementor template overwrite my page?
Not unless you ask. apply-template can append the template under a specific container or replace the whole page. It reads the target with an expected hash, so a concurrent edit is refused, and the write is snapshotted.
Why do element ids change when a template is applied?
apply-template regenerates element ids as it copies the template in, so they cannot collide with elements already on the page.
How do I move an Elementor design between sites?
Use export-page to get a portable envelope with the content tree, page settings and Elementor version, then give it to import-template on the other site. Both sites need to be running WP MCP Pro.
Does reusing Elementor templates need the Pro tier of WP MCP?
Yes. The guide's template tools require WP MCP with its Pro tier active, along with Elementor itself.
Can I undo an applied template?
Yes. The apply is snapshotted before it writes, so rollback-operation undoes it per change, or rollback-session undoes a whole session.
All WP MCP guides, or see every plugin integration. Topic: Elementor.