Elementor Content
Manipulate Elementor's JSON conservatively. Prefer an exported template or staging copy; treat direct _elementor_data writes as a low-level fallback, since widget schemas and internal metadata vary by Elementor, Pro, addon, and feature version.
Workflow
- Identify the target: JSON template or WordPress installation.
- For WordPress, confirm the site, post ID, post type, installed Elementor/Pro versions, and available CLI commands. Never copy version metadata from examples.
- Read the complete document and make a timestamped backup before mutating.
- Inspect a same-site element of the desired type when touching unfamiliar controls. Preserve unknown keys and existing value shapes.
- Make the smallest tree/settings change that satisfies the request. Preserve IDs of unchanged elements; generate collision-free IDs only for new ones.
- Validate JSON, structure, responsive/global references, content quality, and security before writing.
- Write once, read back, parse again, and compare against the intended result.
- Run Elementor's supported cache-regeneration command, clear other caches only when relevant, and visually verify editor plus frontend at relevant breakpoints.
- Restore the backup if validation or rendering fails.
Never mutate a live production page when staging or a draft workflow is available. Never publish, delete, or bulk-update content beyond what the request authorizes.
Choose the Right Reference
| Need |
Read |
| JSON wrapper, tree, IDs, settings, responsive values, globals |
references/element-structure.md |
| Common built-in widget examples |
references/widget-catalog.md |
| Live database reads/writes, backup, verification, CLI |
references/wp-cli-operations.md |
| Pro Theme Builder templates and conditions |
references/theme-builder-templates.md |
| Accessibility, responsive design, performance, security, QA |
references/best-practices.md |
The widget catalog is examples, not a stable schema — inspect same-site JSON or registered widget controls when exact keys matter, especially for nested, Pro, addon, or Editor V4 elements.
Data Rules
- Exported files use the template wrapper (
title, type, version, page_settings, content); _elementor_data stores the content array only.
- Preserve
settings as an empty array or object, matching source data; do not normalize without reason.
- Each element needs a document-unique
id, elType, settings, and elements array; widgets also need widgetType.
- Preserve source
isInner values; never infer container depth from it or rewrite it just because an element moved.
- Child elements belong on containers and explicitly nested-capable widgets; ordinary widgets keep an empty
elements array.
- Preserve legacy section/column trees unless migration is requested; prefer containers for new layouts the target site supports.
- Preserve
__globals__ references and verify referenced kit styles exist on the destination; do not replace globals with hard-coded values unless asked.
- Support custom breakpoint suffixes beyond
_tablet/_mobile; inspect the site's breakpoint configuration.
- Treat rich text, URLs, custom attributes, custom CSS, shortcodes, and dynamic tags as untrusted input. Preserve only trusted markup; never invent executable content.
Validation
Before writing: parse the exact payload and confirm the root type; recursively check required fields and duplicate element/repeater IDs (IDs need not be hex); confirm each widget type exists on the target site and preserve supported nested children; check media IDs/URLs, internal links, dynamic tags, and global-style references in the destination context; review heading order, landmarks, alt text, descriptive links, keyboard behavior, visible focus, contrast, and motion controls; review desktop and every enabled breakpoint without duplicating layouts merely to hide them per device; prefer global styles, responsive inheritance, shallow container trees, and appropriately sized media.
After writing: read back and parse the stored value; confirm the intended diff and that unrelated content is unchanged; run wp elementor flush-css (and wp elementor-pro theme-builder clear-conditions for condition changes) when available; verify the editor loads, then frontend rendering and interactions at relevant breakpoints.
1---2name: elementor-content3description: Create, inspect, update, migrate, import, or delete Elementor content in exported JSON templates or WordPress post metadata via WP-CLI. Use for Elementor pages, library and Pro Theme Builder templates, containers, legacy sections/columns, widgets, responsive settings, global styles, and display conditions.4---56# Elementor Content78Manipulate Elementor's JSON conservatively. Prefer an exported template or staging copy; treat direct `_elementor_data` writes as a low-level fallback, since widget schemas and internal metadata vary by Elementor, Pro, addon, and feature version.910## Workflow11121. Identify the target: JSON template or WordPress installation.132. For WordPress, confirm the site, post ID, post type, installed Elementor/Pro versions, and available CLI commands. Never copy version metadata from examples.143. Read the complete document and make a timestamped backup before mutating.154. Inspect a same-site element of the desired type when touching unfamiliar controls. Preserve unknown keys and existing value shapes.165. Make the smallest tree/settings change that satisfies the request. Preserve IDs of unchanged elements; generate collision-free IDs only for new ones.176. Validate JSON, structure, responsive/global references, content quality, and security before writing.187. Write once, read back, parse again, and compare against the intended result.198. Run Elementor's supported cache-regeneration command, clear other caches only when relevant, and visually verify editor plus frontend at relevant breakpoints.209. Restore the backup if validation or rendering fails.2122Never mutate a live production page when staging or a draft workflow is available. Never publish, delete, or bulk-update content beyond what the request authorizes.2324## Choose the Right Reference2526| Need | Read |27|---|---|28| JSON wrapper, tree, IDs, settings, responsive values, globals | `references/element-structure.md` |29| Common built-in widget examples | `references/widget-catalog.md` |30| Live database reads/writes, backup, verification, CLI | `references/wp-cli-operations.md` |31| Pro Theme Builder templates and conditions | `references/theme-builder-templates.md` |32| Accessibility, responsive design, performance, security, QA | `references/best-practices.md` |3334The widget catalog is examples, not a stable schema — inspect same-site JSON or registered widget controls when exact keys matter, especially for nested, Pro, addon, or Editor V4 elements.3536## Data Rules3738- Exported files use the template wrapper (`title`, `type`, `version`, `page_settings`, `content`); `_elementor_data` stores the content array only.39- Preserve `settings` as an empty array or object, matching source data; do not normalize without reason.40- Each element needs a document-unique `id`, `elType`, `settings`, and `elements` array; widgets also need `widgetType`.41- Preserve source `isInner` values; never infer container depth from it or rewrite it just because an element moved.42- Child elements belong on containers and explicitly nested-capable widgets; ordinary widgets keep an empty `elements` array.43- Preserve legacy section/column trees unless migration is requested; prefer containers for new layouts the target site supports.44- Preserve `__globals__` references and verify referenced kit styles exist on the destination; do not replace globals with hard-coded values unless asked.45- Support custom breakpoint suffixes beyond `_tablet`/`_mobile`; inspect the site's breakpoint configuration.46- Treat rich text, URLs, custom attributes, custom CSS, shortcodes, and dynamic tags as untrusted input. Preserve only trusted markup; never invent executable content.4748## Validation4950Before writing: parse the exact payload and confirm the root type; recursively check required fields and duplicate element/repeater IDs (IDs need not be hex); confirm each widget type exists on the target site and preserve supported nested children; check media IDs/URLs, internal links, dynamic tags, and global-style references in the destination context; review heading order, landmarks, alt text, descriptive links, keyboard behavior, visible focus, contrast, and motion controls; review desktop and every enabled breakpoint without duplicating layouts merely to hide them per device; prefer global styles, responsive inheritance, shallow container trees, and appropriately sized media.5152After writing: read back and parse the stored value; confirm the intended diff and that unrelated content is unchanged; run `wp elementor flush-css` (and `wp elementor-pro theme-builder clear-conditions` for condition changes) when available; verify the editor loads, then frontend rendering and interactions at relevant breakpoints.