How to move an Elementor page to another site without broken images
Export an Elementor page and bring it to another site, and the design itself usually survives — the layout, the columns, the widget structure all look right. Then you notice a background image is missing. A gallery shows a handful of broken thumbnails. An icon box's image loads, but a button that should link to "our services page" still points back at the old site. Everything rendered, which makes this a particularly easy kind of broken to miss during a quick check.
Why the design survives but the images don't
Elementor stores a page's entire design as one JSON tree in _elementor_data — sections, columns, and widgets nested arbitrarily deep, each with its own settings. Most of that JSON is self-contained: layout, spacing, colors, text. But an Image widget, a background-image control, a gallery, an icon box — anything that shows a picture — stores it as {"id": 123, "url": "https://..."}, Elementor's standard media-control shape. The id is a plain WordPress attachment ID, and an attachment ID is a number assigned by that site's own database. On another site, that same number belongs to a completely different attachment, or to nothing at all. This is the same cross-database identifier problem the first post on this blog covers in general — Elementor just buries it a few levels deeper inside a JSON tree instead of a flat meta value.
It's not only the Image widget
The media-control shape shows up all over a typical page: a section's background image, a gallery's list of images, an icon box, a repeater's items (tabs, slides, accordion panels), even _elementor_page_settings itself (page-level background, favicon override). Finding every one of these means recursively walking the full element tree — sections into columns into widgets into their settings, and settings can nest further still for repeater-style controls — rather than only checking the handful of fields a specific widget type is known to use. A reference three levels deep inside a slider's slide list needs the exact same handling as one sitting directly on an Image widget; treating only the "obvious" top-level cases is how a gallery ends up migrating with its first image fine and the rest silently broken.
The subtle bug: id gets fixed, url doesn't
Here's the part that catches people even when they do set out to rewrite attachment IDs: a media reference carries both an id and a url, and they don't automatically stay in sync once you've changed one. The standard Image widget's own render path re-resolves the displayed URL from the current id every time the page loads — so if you only rewrite id, an Image widget actually looks fine. A background-image control is different: Elementor generates its CSS from the stored url directly, not from a fresh lookup against id. Rewrite the ID and leave the URL alone, and a background image keeps pointing at the source site indefinitely, even though every other signal says the migration "worked." The fix has to explicitly refresh url from whatever id now resolves to, immediately after the ID itself changes — not assume the two will stay consistent on their own.
Internal links need the same treatment
A button or a linked image pointing at another page on the same site uses a different shape — a URL control, distinguished from a media reference by having a url but no id. That URL is just as site-specific as an attachment ID: it points at a path on the source domain, which means nothing (or worse, redirects back to the old site) once the page lives somewhere else. Resolving it means recognizing it's a same-site URL, working out which post it actually points to, and rewriting it to wherever that post ended up on the destination — with a sane fallback (keep the original URL rather than leave a broken placeholder) for the case where the linked post hasn't been migrated there yet.
Images that aren't in an id field at all
Not every image reference on an Elementor page lives inside the tidy {id, url} shape. A Text Editor or HTML widget can have an <img> tag typed straight into its markup. Custom CSS can reference a background image by URL. None of that is a media control Elementor's own data format recognizes as one — it's just a string, somewhere in the tree, that happens to contain a URL under this site's own uploads directory. Catching those means scanning every string value in the page for something that looks like a same-site upload URL (absolute, protocol-relative, or root-relative — hand-written markup uses all three) and treating it as its own kind of reference to resolve, separately from the structured media controls.
What PostDeploy does about all of this
Pushing an Elementor page walks the full _elementor_data tree and _elementor_page_settings recursively, finds every media reference and internal link at any depth, and replaces each attachment ID with a placeholder that gets resolved to the real destination attachment once it's been imported — refreshing the paired URL at the same time, so a background image doesn't keep pointing at the old site after everything else looks migrated. Internal links are resolved the same way, with the original URL kept as a fallback if the linked page hasn't made it to the destination yet. Same-site upload URLs typed directly into HTML or custom CSS are found and rewritten too, not just the structured media controls. If a page's widget data can't be safely re-encoded after rewriting — malformed content Elementor itself would otherwise choke on — the original value is left in place rather than risk writing something broken; a half-fixed page beats one Elementor's own editor can't recover.
Try it
PostDeploy Free moves Posts, Pages, and custom post types as plain content. PostDeploy Pro adds the Elementor image and internal-link resolution described here — see the Elementor integration page for the full list — along with ACF and WPML reference resolution.