# Divi Page Cloning Workflow

> Clone Divi pages with Royal MCP Pro: retarget a services page for a new offering, duplicate landing pages across a portfolio, and roll back with undo.

- Canonical: <https://royalplugins.com/support/royal-mcp-pro/divi-page-cloning-workflow/>
- HTML version: <https://royalplugins.com/support/royal-mcp-pro/divi-page-cloning-workflow/>

---

End-to-end walkthrough for cloning Divi pages via MCP — the reference use case is "duplicate the services page for a new offering," but the same pattern works for landing-page variants, seasonal campaigns, A/B tests, and portfolio-wide template duplication. Dual-format (Divi 4 shortcodes + Divi 5 blocks + mixed), fresh element IDs, meta preserved, 72-hour undo.

Who this is for

You have an existing Divi page you want to duplicate and lightly modify for a new context — a new service offering, a variant landing page, a rebrand of a template. You want the duplicate to open cleanly in the Divi builder (no ID collisions) and you want a rollback path if the result isn't right.

## Prerequisites

- Divi theme active (Divi 4 or Divi 5)
- Royal MCP Pro installed and licensed (see [Getting Started](https://royalplugins.com/support/royal-mcp-pro/getting-started/))
- MCP client connected to your site (Claude.ai, Claude Desktop, ChatGPT, Cursor, etc.)
- Source Divi page to clone (any page with `_et_pb_use_builder=on` or `[et_pb_*` shortcodes / `divi/*` blocks)
- Cap: `edit_posts` minimum, plus `read_post` on the source

## The full clone workflow

#### Identify the source page

You need the source post ID. Fast ways to get it:

- Ask your AI: "Find my Services page and give me its post ID." The agent will call a WP tool like `wp_search` or `wp_get_posts`.
- Or just check the wp-admin URL: `post.php?post=42&action=edit` — that number is the ID.

#### Clone the page

Call `divi_clone_page`. Minimum args are `source_post_id` and `new_title`. Defaults to draft status.

```
Clone Divi page 42 as "Services V2 Test" using divi_clone_page.
```

The response's `content[0].text` gives you a human-readable summary; `structuredContent` has the machine payload:

```
{
  "isError": false,
  "content": [
    { "type": "text", "text": "Cloned Divi post 42 → 4291 (\"Services V2 Test\", format=divi_4_shortcodes, shortcodes=17, blocks=0)." }
  ],
  "structuredContent": {
    "new_post_id": 4291,
    "source_post_id": 42,
    "new_title": "Services V2 Test",
    "new_status": "draft",
    "format_detected": "divi_4_shortcodes",
    "shortcode_count": 17,
    "block_count": 0,
    "edit_url": "https://yoursite.com/wp-admin/post.php?post=4291&action=edit"
  },
  "undo": {
    "token": "<64-character-hex-token>",
    "expires_at": "2026-08-08T14:23:15Z",
    "ttl_hours": 72
  }
}
```

**Save the undo token** if you might want to reverse this. It's good for 72 hours.

What the clone actually preserves

Every `_et_pb_*` post meta is copied over (page layout, gutter width, builder-on flag). D5 blocks get regenerated `clientId`s so the clone opens without collisions. D4 shortcodes are validated pre-write so an invalid source refuses cleanly rather than corrupting the destination.

#### Retarget text (Free) — the "rebrand" step

Now walk through the clone and substitute copy that needs to change. The free `divi_replace_text` tool handles this single-page swap:

```
On post 4291, replace the text "Web Design" with "SEO Consulting" using divi_replace_text.

On post 4291, replace "web design services" with "SEO consulting services" using divi_replace_text.

On post 4291, replace "Get a Design Quote" with "Get an SEO Audit" using divi_replace_text.
```

Each call returns the count of replacements made. Free-tier tool, no undo token needed for text swaps within the clone (if you don't like the result, just undo the whole clone in step 5).

#### Retarget images (Pro) — swap hero, badges, testimonials

Use the Pro `divi_replace_image` tool for each image URL that needs to change:

```
On post 4291, swap image https://yoursite.com/wp-content/uploads/2024/hero-webdesign.jpg for https://yoursite.com/wp-content/uploads/2026/hero-seo.jpg using divi_replace_image.

On post 4291, swap https://yoursite.com/wp-content/uploads/2024/testimonial-jane.jpg for https://yoursite.com/wp-content/uploads/2026/testimonial-mark.jpg using divi_replace_image.
```

Each call returns its own undo token — but again, if you're going to trash the whole clone anyway, just undo the clone in step 5 and skip the per-image undos.

#### Preview + publish (or trash)

Open the `edit_url` from the step-2 response. Preview the clone in the Divi builder. Check:

- Text swaps landed correctly across headings, buttons, body copy
- Images loaded (no missing thumbnails in the Divi editor)
- Layout preserved (no shortcode leakage, no orphaned modules)
- Featured image still set (Divi clone copies meta but featured image is a separate WP post meta — verify manually if you want it carried over)

If it looks right, change status from Draft to Publish and it's live. If it doesn't, jump to step 6.

#### Undo if the clone isn't right

Call `royal_mcp_undo_last_operation` with the token from step 2:

```
Undo the clone with token <64-character-hex-token> using royal_mcp_undo_last_operation.
```

The `undo_delete_created_post` handler calls `wp_delete_post($pid, true)` — force-deletes the created draft and cascade-deletes its meta rows. The source page is untouched.

You can now try again with a different `new_title` or a different source, or go into the wp-admin manually to check what went wrong.

## Common scenarios

### Portfolio-wide template duplication

For "clone this landing page across 20 client sites," you're actually running the workflow 20 times — once per site. The Pro tool doesn't cross site boundaries. What DOES help across sites is exporting the Divi library entry from one site and importing it via `divi_import_template` on the others (see the [divi\_import\_template tool ref](https://royalplugins.com/support/royal-mcp-pro/divi-tools/#divi_import_template)). That's a different workflow — library-based, not clone-based.

### A/B test variants of a landing page

Clone the page N times with different titles ("Landing V1", "Landing V2", "Landing V3"), retarget each with the variant copy/imagery, publish them behind an A/B test plugin. Each clone gets its own undo token — keep a note of which token maps to which variant so you can bulk-clean losing variants later.

### Seasonal campaign duplication

Clone the year-ago page, run `divi_replace_text` to swap year references and dates, run `divi_replace_image` for updated imagery. Same workflow, ~5 minutes end-to-end per page.

### Rebrand mid-flight

Company name changed. Clone every published Services / About / Contact / Landing page, run text replacements for the old name → new name, run image replacements for old logo → new logo, review each clone, publish and unpublish the originals in the same session. The 72-hour undo tokens give you a safety window in case a rebrand copy pass missed something.

## Common issues

### `source_not_divi` error on a page you're sure is Divi

The tool checks for `_et_pb_use_builder=on` meta OR `[et_pb_*` shortcodes / `divi/*` blocks in `post_content`. If a page was created via a starter template but never saved through the builder, the meta flag may not be set. Open the page in the Divi builder once and click Save — that seeds the flag — then retry the clone.

### `source_content_invalid` refusal

The clone tool validates Divi 4 shortcode structure before writing (matched open/close tags, valid module names). Refusal means the source content is malformed and cloning would propagate the malformation. Fix the source in the Divi builder first, then retry.

### Featured image not carried over

Divi's `_et_pb_*` meta doesn't include the WordPress `_thumbnail_id` post meta (that's a core WP field, not a Divi one). If you want the featured image on the clone too, use `wp_set_featured_image` after the clone completes:

```
Set the featured image of post 4291 to attachment ID 1234 using wp_set_featured_image.
```

### Retarget didn't hit a specific field

`divi_replace_text` walks text-bearing widget settings (title, text, content, buttonText, body, header, subtitle, caption, alt, title\_text, description, placeholder). If your text lives in a module setting outside that list (e.g. custom code widget's raw HTML), the replace won't touch it. For those cases: edit manually in the Divi builder after cloning, or use `wp_update_post` for a whole `post_content` rewrite (destructive — keep the undo token handy).

## Still Stuck? Two-Step Support Path

If the clone workflow isn't running the way you expected, work through these two steps in order.

### Step 1: Start with the Royal MCP Troubleshooting Guide

[**Royal MCP Troubleshooting — Start Here**](https://royalplugins.com/support/royal-mcp/troubleshooting-start-here/) covers MCP-layer issues.

For Pro-specific patterns:

- [Builder session detected](https://royalplugins.com/support/royal-mcp-pro/builder-session-detected-force-override/) — if the clone fails because someone has the source or destination open in the Visual Builder
- [Undo token errors](https://royalplugins.com/support/royal-mcp-pro/undo-token-errors/)
- [Pro tool returned upgrade prompt with valid license](https://royalplugins.com/support/royal-mcp-pro/pro-tool-returned-upgrade-prompt/)

### Step 2: Email priority support

If you've worked through Start Here and the relevant Pro-specific doc and the clone still isn't working, email priority support from your purchase email address at **[support@royalplugins.com](mailto:support@royalplugins.com)**. Priority email support is included with your license — typical response within 24 hours. **Never include your license key in email**; we look it up from your purchase address.

What to include in your email

- **Your hosting provider**
- **Royal MCP Pro version** + **Divi version**
- **Which MCP client** you were using
- **The exact source\_post\_id + new\_title** you called with
- **The full error response** including `content[0].text` and any `error` field in `structuredContent`
- **The output of `divi_get_page_format`** (free tool) on the source post — helps us see the format detection result
- **Screenshot of the most recent Pro tool row in Audit Log** with View Details expanded

[← Divi 4 → 5 Migrator](https://royalplugins.com/support/royal-mcp-pro/divi-migrator-guide/)
[Bulk Price Updates + Undo →](https://royalplugins.com/support/royal-mcp-pro/bulk-price-updates-with-undo/)
