Skip to content

Elementor containers vs legacy sections: convert, or leave it alone

What actually changes when Elementor's flexbox container replaces the Section/Column model, what the built-in converter handles and what it quietly leaves to you, and a page-by-page migration order that always keeps a rollback.

If you are starting a new Elementor site, the decision is already made for you: build in containers, and never place a legacy section again. If you have an existing site built on sections, the answer is different, and it is not “convert everything this weekend”. Nothing forces the migration. Legacy pages still render, Elementor still ships the code that renders them, and a site-wide bulk conversion is the single most reliable way to break a layout that was working fine on Monday. The workable position is the one Elementor supports on purpose: run both models on the same site, convert a page when it is already due for editing, and leave the rest alone. What follows is what really differs in the markup and the controls, what the built-in converter does and does not handle, and the order of operations that keeps a rollback within reach.

What you’ll accomplish

  • Decide, page by page, whether a conversion is worth doing at all
  • Inventory which pages still use sections, and which custom CSS and addon widgets depend on the old markup
  • Convert a page on staging with a per-page record of the layout you started from
  • Validate the result at every breakpoint before anything reaches production
  • Leave the site in a mixed state that Elementor supports, rather than a half-finished one that it does not

Prerequisites

  • Elementor 3.16 or newer. Containers became the default layout element in 3.16; grid containers arrived later in the 3.x line. Check the version on the WordPress Plugins screen before you plan anything, because the converter’s location in the interface has moved between releases.
  • A staging environment that is a full copy of production, not a trimmed export. Container behaviour depends on the theme, the active kit, and every addon plugin, so a partial clone will lie to you.
  • A database export you can restore, held outside the web root.
  • A clear owner for the custom CSS. Before you touch a page, you need to know whether the CSS that styles it lives in a child theme, in Elementor’s Site Settings custom CSS, inside a per-page Advanced tab, or in a code-snippets plugin. If nobody can answer that, stop and find out first.
  • WP-CLI access, and the database table prefix for the site. The queries below use the default wp_ prefix.

How it works

The legacy model wraps every widget in four elements. A section renders as div.elementor-section, which holds div.elementor-container, which holds one or more div.elementor-column, each of which holds div.elementor-widget-wrap, which finally holds the widgets. Layout is expressed as column width percentages, and spacing is expressed as padding and margins applied at several of those levels at once.

The container model collapses that. A container renders as a single div carrying e-con and a display class such as e-flex, and that element is itself the flex parent. Widgets are its direct children. When you need a sub-layout, you nest another container inside, with no fixed nesting limit and no separate “inner section” element.

Side-by-side DOM trees showing four legacy wrapper elements above each widget versus a single flex container wrapper

Four consequences follow, and they are the whole story:

  1. Less markup and less CSS per page. Removing three wrapper levels from every section removes real DOM nodes and the rules that positioned them. On a long landing page the difference is measurable, though it is rarely the largest thing on your page-weight list; see why Elementor pages get slow before you convert for performance reasons alone.
  2. Different layout controls. Column widths, and the negative-margin tricks that went with them, are replaced by flex direction, justify, align, gap and wrap. Gap is a container-level property, so spacing that used to be set per column is now set once on the parent.
  3. Responsive controls move. Direction, gap, wrap and alignment all take per-breakpoint values. The legacy behaviour where columns automatically stacked below the tablet breakpoint is not automatic any more; a flex row stays a row until you tell it otherwise at that breakpoint.
  4. The class names change. This is the part that bites hardest and is invisible until it ships. Any selector written against .elementor-section, .elementor-column or .elementor-widget-wrap simply stops matching on a converted page, because those elements no longer exist in the output.

Elementor ships an optional converter for existing pages. It is an editor feature, not a command-line tool — there is no WP-CLI command that converts a page. Consult Elementor’s help centre for the exact placement in your version.

Step-by-step

  1. Take a database export you can actually restore. Do this on both staging and production, and put the file somewhere the web server cannot serve it.

    wp db export /root/backups/pre-container-$(date +%F).sql

    Success looks like Success: Exported to '/root/backups/pre-container-2026-08-23.sql'. and a file of plausible size. A few kilobytes means you exported the wrong database.

  2. Clone production to staging and confirm parity before you change anything. Load three or four representative pages on staging and compare them to production. If staging already renders differently, you have no baseline and every later difference is ambiguous.

  3. Inventory the pages that still use the legacy model. Elementor stores each page’s layout as JSON in the _elementor_data post meta, and legacy top-level rows carry "elType":"section".

    wp db query "SELECT p.ID, p.post_status, p.post_title
      FROM wp_posts p
      JOIN wp_postmeta m ON m.post_id = p.ID
      WHERE m.meta_key = '_elementor_data'
        AND m.meta_value LIKE '%\"elType\":\"section\"%'
      ORDER BY p.post_status, p.ID;"

    You get a tab-separated list of post IDs and titles. That count is your real backlog. Adjust wp_ if your prefix differs, and expect templates and popups to show up alongside pages.

  4. Rank the list by traffic, not by page count. Pull your top pages from analytics and convert nothing that is both high-traffic and untouched for a year — those pages carry the most risk and the least benefit. The candidates worth converting first are the ones your editors are about to change anyway.

  5. Grep every place a legacy selector could be hiding. This is the audit that determines whether the migration is an afternoon or a fortnight.

    grep -rn --include='*.css' --include='*.scss' --include='*.js' --include='*.php' \
      -e 'elementor-section' -e 'elementor-column' -e 'elementor-widget-wrap' \
      wp-content/themes/ wp-content/plugins/

    No output is the outcome you want. Every line that comes back is a rule that will stop applying, and it names the file and line number so you can plan the rewrite. Then check the CSS that lives in the database rather than in files:

    wp db query "SELECT DISTINCT post_id FROM wp_postmeta
      WHERE meta_key = '_elementor_page_settings'
        AND meta_value LIKE '%elementor-column%';"

    Any post ID returned has page-level custom CSS bound to the old structure. Elementor’s Site Settings custom CSS lives on the active kit post, so it will appear here too if it references those classes.

  6. List the addon widgets in play. Open the Plugins screen and note every Elementor addon pack. Widgets that emit their own row-and-column markup, or that read the parent column’s width, misbehave after conversion. Check each addon’s changelog for container support before converting a page that uses it, and if a widget starts rendering empty afterwards, work it as an Elementor plugin conflict rather than as a container bug.

Migration loop from staging clone through audit, conversion and breakpoint check to promotion, with a rollback branch back to the conversion step

  1. Record the page’s current layout before you convert it. Dump the Elementor data for that single post ID.

    wp post meta get 42 _elementor_data > /root/backups/page-42-before.json

    Expect a single long line of JSON beginning with [{"id":. Treat this as documentation of what the page was, not as your restore mechanism — the practical rollback is the WordPress revision or the database export from step 1.

  2. Convert the page in the editor. Open the page with Elementor. Where your version exposes the converter, it appears in the editor once Elementor detects legacy sections on the page; some releases also offer a per-section option from the right-click menu in the Navigator. Convert one page, not the site. If your version does not offer the converter, or the page is short, rebuilding the section by hand as a container is often faster than auditing what the converter changed.

  3. Regenerate Elementor’s CSS files. Go to Elementor, then Tools, then use Regenerate Files & Data. Converted pages keep serving stale per-page CSS otherwise, which produces the maddening case where the layout looks broken until you open the editor and save again. Purge your page cache and CDN afterwards.

  4. Confirm the markup actually changed. Fetch the rendered staging page and count the legacy classes.

    curl -s https://staging.example.com/about/ | grep -c 'elementor-section'

    A fully converted page returns 0. A number greater than zero means part of the page is still on the old model — usually a header or footer template, which is a separate Elementor document and converts separately.

  5. Promote one page, then stop and look. The cleanest promotion is to repeat the conversion directly on production during a quiet window, using the notes from the staging run so you already know which fixes to reapply. Copying the _elementor_data meta between environments is possible but has to survive shell quoting intact, so if you go that route, open the page in the editor afterwards and confirm it loads before you call it done. Then leave the site alone for a day before converting the next page.

Validate it works

Take before-and-after screenshots at each breakpoint you actually support — desktop at 1440, tablet at 1024 and 768, mobile at 375 — plus any custom breakpoints defined in Site Settings. Elementor’s responsive preview is a first pass, not the check; resize a real browser window and load the page on a real phone, because the preview iframe does not reproduce viewport units or sticky behaviour faithfully.

Then verify the three things most likely to have quietly broken. First, that custom CSS still applies: open DevTools, select an element that used to be styled, and confirm the rule appears in the Styles pane rather than not appearing at all. A rule that no longer matches does not show up struck through — it simply is not listed. Second, that spacing is what you intended: compare the computed padding and gap on the container against the old column padding. Third, that interactive elements still work: forms, popups, sticky headers and anything with a scroll or motion effect, all of which read the element structure.

Finally, re-run the count from step 10 across every page you converted.

Troubleshooting

Custom CSS no longer matches anything. This is the expected failure, not a bug. Rewrite the selector against a class you control: add a class in the container’s Advanced tab and target that, rather than swapping .elementor-section for .e-con and inheriting the same fragility. Selectors pinned to Elementor’s internal class names will break again at the next structural change.

An addon widget renders empty, unstyled, or full-width. The widget is looking for a parent column that no longer exists. Check for an addon update that mentions container support; if there is none, either keep that page on the legacy model or replace the widget. Do not patch the addon’s CSS to fake the old wrappers.

Everything shifted by a few pixels. Gap replaces per-column padding, and the default container gap comes from Site Settings, not from the page you are editing. Set the gap explicitly on the converted container instead of nudging padding until it looks right, or the next kit change will move it again.

Desktop is perfect and mobile is wrong. Legacy columns stacked automatically below the tablet breakpoint. A flex container does not: it stays row until you set the direction to column at that breakpoint. Fix the direction per breakpoint on the container rather than adding a CSS override.

The page looks right in the editor and broken on the front end. Almost always stale generated CSS or a cache layer. Regenerate files and data, purge the page cache and the CDN, then load the page in a private window before you conclude anything about the conversion.

When this is the wrong approach

Leave a legacy site alone when the pages are stable and nobody is editing them. A brochure site that has not changed in two years gains nothing from a conversion and risks a layout regression on pages that currently earn their keep. The same applies when the site depends on an addon pack that has not shipped container support: converting first and hoping the vendor catches up leaves you with the risks of both models and the benefits of neither.

Leave it alone, too, when the layout is contractually pixel-locked and there is no budget for the QA pass: the conversion is cheap, the visual verification is not, and skipping the second half is how conversions turn into incidents. And if the complaint is performance, measure first. Wrapper removal helps, but it is rarely what holds a page back.

Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.