WordPress Elementor
Edit Elementor pages and manage templates on existing WordPress sites. Produces updated page content via browser automation (for visual/structural changes) or WP-CLI (for safe text replacements).
Prerequisites
- Working WP-CLI connection or admin access (use wordpress-setup skill)
- Elementor installed and active:
wp @site plugin status elementor
Workflow
Step 1: Identify the Page
Step 2: Choose Editing Method
Rule of thumb: If you're only changing text or URLs within existing widgets, WP-CLI is faster. For anything structural, use the visual editor via browser.
Step 3a: Text Updates via WP-CLI
Always back up first:
Pre-flight checklist:
- Back up the postmeta (above)
- Dry run the replacement
- Verify the dry run matches expectations (correct number of replacements)
- Execute
- Flush CSS cache
- Verify visually
Simple text replacement:
After updating, clear Elementor's CSS cache:
If the elementor WP-CLI command isn't available:
What's safe to replace:
Step 3b: Visual Editing via Browser Automation
For structural changes, use browser automation to interact with Elementor's visual editor.
Login flow (skip if already logged in via Chrome MCP):
- Navigate to
https://example.com/wp-admin/ - Enter username and password
- Click "Log In"
- Wait for dashboard to load
Open the editor:
- Navigate to
https://example.com/wp-admin/post.php?post={ID}&action=elementor - Wait for Elementor loading overlay to disappear (can take 5-10 seconds)
- Editor is ready when the left sidebar shows widget panels
Edit text content:
- Click on the text element in the page preview (right panel)
- The element becomes selected (blue border)
- The left sidebar shows the element's settings
- Under "Content" tab, edit the text in the editor field
- Changes appear live in the preview
- Click "Update" (green button, bottom left) or Ctrl+S
Edit heading:
- Click the heading in the preview
- Left sidebar > Content tab > "Title" field
- Edit the text
- Optionally adjust: HTML tag (H1-H6), alignment, link
- Save
Change image:
- Click the image widget in the preview
- Left sidebar > Content tab > click the image thumbnail
- Media Library opens
- Select new image or upload
- Click "Insert Media"
- Save
Edit button:
- Click the button in the preview
- Left sidebar > Content tab: Text (label), Link (URL), Icon (optional)
- Style tab: colours, typography, border, padding
- Save
Using playwright-cli:
Or Chrome MCP if using the user's logged-in session.
Step 4: Manage Templates
List saved templates:
Export a template (browser):
- Navigate to:
https://example.com/wp-admin/edit.php?post_type=elementor_library - Hover over the template > "Export Template"
- Downloads as .json file
Import a template (browser):
- Navigate to:
https://example.com/wp-admin/edit.php?post_type=elementor_library - Click "Import Templates" at the top
- Choose file > upload .json
- Template appears in the library
Apply a template to a new page:
- Create the page:
wp @site post create --post_type=page --post_title="New Page" --post_status=draft - Open in Elementor via browser
- Click the folder icon (Add Template)
- Select from "My Templates" tab
- Click "Insert"
- Customise and save
Duplicate an existing page via WP-CLI:
Apply template between pages via WP-CLI:
Step 5: Verify
Take a screenshot to confirm visual changes:
Critical Patterns
Elementor Data Format
Elementor stores page content as JSON in _elementor_data postmeta. The structure is:
Each element has an id, elType, widgetType, and settings object. Direct manipulation of this JSON is possible but fragile -- always back up first and prefer search-replace over manual JSON editing.
CSS Cache
After any WP-CLI change to Elementor data, you must flush the CSS cache. Elementor pre-generates CSS from widget settings. Stale cache = visual changes don't appear.
Global Widgets
Global widgets are shared across pages. Editing one updates all instances.
Caution: Replacing text in a global widget's data affects every page that uses it.
Elementor Pro vs Free
Theme Builder templates (header, footer, archive) are stored as elementor_library post type with specific meta indicating their display conditions.
Common Elementor WP-CLI Commands
If the Elementor CLI extension is available:

