Magento
CMS Page Import / Export
Recreating CMS pages by hand — across store views, between staging and live, or after a rebuild — is slow and error-prone. CMS Page Import / Export turns every page into a row in a plain CSV: export the lot, edit in a spreadsheet or version them in git, then import to create or update pages in place. It carries the full HTML, the SEO metadata, the page layout and the store-view scope — and sanitises HTML on the way in, so an import can’t smuggle script onto your storefront.

Install
Section titled “Install”Install CMS Page Import / Export with Composer using your AgenticEcom licence key (find it on your My Licences page — one key unlocks every module you own):
# 1. Register the AgenticEcom repository (once per store)composer config repositories.agenticecom composer https://repo.agenticecom.netcomposer config --global --auth http-basic.repo.agenticecom.net <YOUR-LICENCE-KEY> x
# 2. Require this modulecomposer require agenticecom/module-cms-page-import-export
# 3. Apply itphp bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento cache:flushCompatibility
Section titled “Compatibility”PHP
Format
Scope
Turn it on
Section titled “Turn it on”The buttons only appear once the feature is enabled (it is on by default after install).
-
Go to Stores → Configuration → AgenticEcom · SEO & Content → CMS Page Import / Export.
-
Set Enable Import / Export to Yes (the default) and Save Config.
-
Open Content → Elements → Pages. You’ll now see Import CSV and Export CSV buttons at the top of the grid.
Export your pages
Section titled “Export your pages”-
On Content → Elements → Pages, click Export CSV.
-
Choose the store scope — All Store Views, or a single store view.
-
Download the file. Every page in scope is written as one row, with its HTML content, metadata, layout and store assignment.
Import (create or update)
Section titled “Import (create or update)”-
Click Import CSV and upload your file.
-
Choose the target store scope for the import.
-
Choose a behaviour:
- Add / Update (default) — pages are matched by
identifierwithin the scope and updated in place; new identifiers are created. - Add only — new pages are created; existing identifiers are skipped (no error).
- Add / Update (default) — pages are matched by
-
Confirm. You get a per-row summary — created, updated and skipped counts, plus any per-row warnings. One bad row never aborts the whole import.
The CSV format
Section titled “The CSV format”A header row names the columns; order doesn’t matter (they’re matched by name).
| Column | Required | Notes |
|---|---|---|
identifier | ✓ | The upsert key — unique per store scope (e.g. about-us). |
title | ✓ | Page title. |
is_active | ✓ | 1/0 or yes/no. |
stores | ✓ | Pipe-separated store codes (default|fr|es) or all. |
content | ✓ | The page HTML (quoted cell). |
content_heading | — | Optional heading. |
page_layout | — | 1column, 2columns-left, 2columns-right, 3columns, cms-full-width or empty. |
meta_title / meta_keywords / meta_description | — | SEO metadata. |
sort_order | — | Integer; default 0. |
Built-in safety
Section titled “Built-in safety”XSS-safe import
On import, <script> tags, inline on* event handlers and javascript: URLs are stripped —
a CSV can’t inject executable code onto your storefront.
Layout preserved
Legitimate markup survives: <style>, Page Builder data-* attributes and video <iframe>
embeds are kept, so your pages still render as designed.
Per-row resilience
Every row is attempted independently. A malformed row is reported and skipped — it never aborts the rest of the import.
Admin-only
Import/export is gated behind the AgenticEcom_CmsPageImportExport::manage permission. There is
no public API surface.
What happens if I import the same file twice?
Pages are matched by identifier within the chosen store scope, so a second import updates those
pages in place rather than creating duplicates — one identifier per scope maps to one page.
Can I move pages from one store view to another?
Yes. Export from store A, then import choosing store B as the target scope. You can also target
multiple store views from a single file using the stores column (default|fr|es, or all).
What HTML is removed for security?
<script> blocks, inline event handlers (onclick=…, onload=…) and javascript: URLs are stripped
on import. Layout HTML — <style>, Page Builder data-* attributes and YouTube/Vimeo <iframe>
embeds — is preserved.
Where do page images go?
Upload them to pub/media/cmspages/ and reference them by URL in your page HTML (e.g.
/media/cmspages/banner.jpg). The CSV carries the HTML and the URLs, not the image binaries.
Is there an API for this?
No — it’s an admin tool by design, with no public REST or GraphQL endpoint, so it can’t be driven by an untrusted client. Verified clean on Magento 2.4.9, PHP 8.4 and 8.5.