# Rebuilding an Elementor site in Astro (what I keep and what I throw away)

> Source: <https://dev.to/lincchad/rebuilding-an-elementor-site-in-astro-what-i-keep-and-what-i-throw-away-2fdb>
> Published: 2026-12-03 00:10:57+00:00

**Recommendation:** Use Playwright full-page screenshots at desktop and mobile widths as the spec, then have the coding agent extract headings, text, buttons and images from `_elementor_data` and diff new screenshots against the originals for missing sections and broken links.
More in the playbook "Working with AI coding agents": <https://wpnews.pro/playbooks/coding-agents>

Half the WordPress sites I get asked to move are built in Elementor. The client wants "the same site, just faster". The problem is there is no clean export. Open the page HTML and every heading sits inside four nested divs with classes like `elementor-element-3f9a1c2`. You can't convert that into anything you'd want to maintain.

So I don't convert it. I rebuild it. But I rebuild it in a very specific order so it doesn't turn into a three week redesign nobody asked for.

First job is a full page screenshot of every page at desktop and mobile width. My coding agent does this with Playwright from the sitemap:

```
npx playwright screenshot --full-page --viewport-size=1440,900 https://client.com/about shots/about-desktop.png
npx playwright screenshot --full-page --viewport-size=390,844 https://client.com/about shots/about-mobile.png
```

These screenshots are the spec. When the client says "the old one had a blue bit there" I can check in 10 seconds instead of arguing.

Elementor stores page content as JSON in post meta (`_elementor_data`), not in `post_content`. So the normal WordPress export gives you mostly empty pages. I grab it straight from the database or with WP-CLI:

```
wp post meta get 42 _elementor_data --format=json > raw/about.json
```

Then I ask the agent to walk the JSON and pull out only the things that matter: headings, paragraphs, buttons (text + link), images (url + alt) and the order they appear in. Everything else (padding, motion effects, custom CSS on a single widget) gets thrown away. The output is one plain markdown or JSON file per page.

Here's the bit that saves the most time. Elementor sites look like 40 unique pages but they're usually about 8 section types repeated: hero, three column features, logo strip, testimonial, CTA band, FAQ, team grid, contact block.

I give the agent the screenshots and the extracted content and ask it for a list of section types with which pages use them. Then I build each one once as an Astro component:

```
---
// src/components/CtaBand.astro
const { heading, text, button } = Astro.props;
---
<section class="cta-band">
  <h2>{heading}</h2>
  <p>{text}</p>
  <a class="btn" href={button.href}>{button.label}</a>
</section>
```

Pages become a stack of components fed by the extracted content. A 40 page site ends up being 8 components plus data, which is way easier to maintain then 40 hand built layouts.

Elementor sites collect stuff. Every rebuild I list these out and get a yes or no in writing:

Clients rarely miss any of it. What they notice is the page loading instantly on their phone.

The header and footer are usually built in Elementor's Theme Builder with mega menus and sticky effects. I rebuild them as one `Header.astro` and one `Footer.astro` with the menu coming from a small JSON file:

```
[
  { "label": "Services", "href": "/services" },
  { "label": "About", "href": "/about" },
  { "label": "Contact", "href": "/contact" }
]
```

That file lives in `/data/menu.json` so on novence.ai the client can change menu labels themselves through the `/edit` page later without calling me.

Once the rebuild is done the agent screenshots the new preview at the same two widths and puts them side by side with the originals. I'm not looking for pixel perfect. I'm looking for missing sections, wrong button links, and images without alt text. It also checks every old URL from the sitemap has either a page or a line in `/_redirects`.

Then it's `npx novence deploy`, client checks the preview, DNS goes over.

Run Lighthouse on the old homepage and the new one before you hand over. Elementor pages tend to ship a pile of CSS and JS before the first image even loads, and the Astro version ships close to none, so the difference is easy to show. Same content, same look near enough, and the client can usually stop paying for Elementor Pro and whatever addon packs got bolted on over the years.

The trick is not trying to translate Elementor into Astro. Treat the old site as a reference and the content as the only thing worth keeping, and the rebuild goes a lot quicker then you'd expect.
