30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Replace URLs in Elementor Documents

elementor/replace-urls bulk-replaces URLs — or any string — inside every Elementor document across the site.

It supports dry_run for a preview count with no writes, and that is not optional in practice.

Before you run it

This rewrites every Elementor document on the site. There is no undo and no trash: a replacement that is too broad, or that breaks the serialised JSON, damages every page at once. Always run it with dry_run: true first and read the count — a number much larger than expected means the search string is matching things you did not intend.

At a glance

Abilityelementor/replace-urls
ToolsetElementor — toolset/elementor
GroupElementor › System & Maintenance
RequiresElementor, active on the site
Capabilitymanage_options
SafetyDestructive — rewrites every Elementor document on the site. Supports a dry run.
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Elementor stores absolute URLs throughout its documents: image sources, link targets, background images, embedded media. After a domain change or a migration from staging, every one of them points at the old host.

Nothing else fixes that. A database search-and-replace tool does not understand the serialised JSON, and WordPress’s own tools do not reach inside post meta of this shape.

So this is the tool for that job, and it is a string replacement across the whole site’s design.

The dry run is the mitigation. It reports how many documents and how many occurrences would change, which is enough to tell a sensible replacement from a catastrophic one — a domain swap touching four hundred occurrences across sixty pages is plausible; the same search matching nine thousand is not.

Replace the longest unambiguous string. A full origin including the scheme is far safer than a bare domain, which can appear inside text.

Elementor generates a CSS file per post and caches it. A change to the document does not change the rendered page until that CSS is regenerated, which is why elementor/clear-cache is the second half of several operations here.

Not idempotent: the second run finds nothing, having already replaced everything.

Input

NameTypeRequiredWhat it is
searchstringYesThe string to find.
replacestringYesWhat to replace it with.
dry_runbooleanNo — defaults to falseReport what would change without writing anything.

What comes back

NameTypeWhat it is
documentsintegerHow many documents were affected.
occurrencesintegerHow many replacements were made or would be.
dry_runbooleanWhether this was a preview.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

We moved from staging — rewrite the URLs in every Elementor page.

It resolves to one call:

{
  "ability": "elementor/replace-urls",
  "parameters": {
    "search": "https://staging.example.com",
    "replace": "https://example.com",
    "dry_run": true
  }
}

Worth knowing

  • Always dry-run first and read the count.
  • Replace the longest unambiguous string — a full origin, not a bare domain.
  • Nothing else reaches inside Elementor’s serialised documents.
  • No undo. Take a backup before the real run.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading