PHPackages                             rocketweb/module-cms-import-export - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. rocketweb/module-cms-import-export

ActiveMagento2-module[CLI &amp; Console](/categories/cli)

rocketweb/module-cms-import-export
==================================

CMS import and export CLI command extension that allows syncing CMS blocks &amp; pages between environments

1.2.0(1y ago)54.9k↑535.7%1OSL-3.0PHPPHP ^7.4|^8.0

Since Aug 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rocketweb/magento-cms-import-export)[ Packagist](https://packagist.org/packages/rocketweb/module-cms-import-export)[ RSS](/packages/rocketweb-module-cms-import-export/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

CMS Import/Export Tool
======================

[](#cms-importexport-tool)

A tool to manage CMS content (both blocks &amp; pages) being imported/exported between environments using the repository. This tool comes handy for build and maintenance projects.

> Ideas for using this:
>
> - allowing FED team to create a CMS block/page in admin but then modify the HTML content using proper IDEs that allow auto-complete &amp; code-styling
> - allowing simpler deployments since there is no manual copy/paste of CMS data needed
> - allowing the client to modify staging content and having it ready for deployment
> - having an easy way to sync up production env to staging/dev/local by exporting on production and importing on staging/dev/local

Installation
------------

[](#installation)

Using composer:

```
composer require rocketweb/module-cms-import-export

```

Then enable module:

```
bin/magento module:enable RocketWeb_CmsImportExport

```

Once the tool is installed, we have two workflows, depending on what we are trying to do.

Export
------

[](#export)

Usage:

```
php bin/magento cms:dump:data [options]

Description:
Dumps cms pages/blocks to var/sync_cms_data for further import

Options:
-t, --type=TYPE                Which type are we dumping - block/page/all
-i, --identifier[=IDENTIFIER]  identifier to process (one or CSV list)
-a, --importAll                Flag to import all files
-r, --removeAll                Flag to remove all existing data

```

As you can see from the options, we need to define:

- type - which can be CMS block, CMS page or both - **required**
- identifier - either a CMS block or CMS page identifier - **optional**

With the combination of these two, we can **export**:

- all CMS content (using --type=all)
- all CMS pages (using --type=page)
- all CMS blocks (using --type=block)
- specific CMS page or pages (using --type=page --identifier=about-us.html,no-route)
- specific CMS block or blocks (using --type=block --identifier=who-are-we,homepage-carousel)

> CMS Page identifier is **Url Key**! Because of that, it can have **.html** suffix - it depends on what is set in the Magento Admin CMS Edit Page. *Use the actual value from CMS Edit Page - Url Key*!If the CMS Page Url Key has **.html** suffix, then the file **%%IDENTIFIER%%** will be: **url\_key\_html.html** (but for export or import, you still use the value from Url Key)

Once you execute the command, you will get the following folder structure:

```
var/sync_cms_data/cms/
- blocks
    - %%IDENTIFIER%%.html => contains the block HTML
    - %%IDENTIFIER%%.json => contains title, is_active, stores information
- pages
    - %%IDENTIFIER%%.html => contains the page HTML
    - %%IDENTIFIER%%.json => contains title, is_ative, page_layou, content_heading

```

You can modify the HTML directly in your editor which should give you more flexibility.

When you are done, commit the files (html &amp; json) to the repository.

Import
------

[](#import)

```
Usage:
php bin/magento cms:import:data [options]

Description:
Import cms pages/blocks from var/sync_cms_data

Options:
-t, --type=TYPE                Which type are we importing - block/page/all
-i, --identifier[=IDENTIFIER]  identifier to process (one or CSV list)
-a, --importAll                Flag to import all files
-s, --store[STORE_CODE]        Store code to process only pages/blocks specific to this store

```

This command works by using files in `var/sync_cms_data/cms/` path. As you can see from the options, we need to define:

- type - which can be CMS block or CMS page - **required**
- identifier - either a CMS block or CMS page identifier - **optional**There are optional parameters:
- importAll - when identifiers not specified we'll import all blocks or pages
- store - store code (like default) to import block(s)/pages(s) only for specific store With the combination of these two, we can **import**:
- all CMS pages (using --type=page and importAll)
- all CMS blocks (using --type=block and importAll)
- specific CMS page or pages (using --type=page --identifier=about-us,homepage-new)
- specific CMS block or blocks (using --type=block --identifier=who-are-we,homepage-carousel)
- specific CMS page by store (using --type=page --identifier=about-us-default --store=default) Once you execute the command, the content will be created/updated in Magento Admin. By executing `php bin/magento cache:flush` you should be able to see the updated CMS content on frontend also!

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~272 days

Total

3

Last Release

521d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19220614?v=4)[Rocket Web FED](/maintainers/rocketweb-fed)[@rocketweb-fed](https://github.com/rocketweb-fed)

---

Top Contributors

[![dima-RW](https://avatars.githubusercontent.com/u/157450276?v=4)](https://github.com/dima-RW "dima-RW (12 commits)")[![yurii-RW](https://avatars.githubusercontent.com/u/78092753?v=4)](https://github.com/yurii-RW "yurii-RW (3 commits)")[![gregor-RW](https://avatars.githubusercontent.com/u/29927193?v=4)](https://github.com/gregor-RW "gregor-RW (1 commits)")[![mihai-RW](https://avatars.githubusercontent.com/u/156606786?v=4)](https://github.com/mihai-RW "mihai-RW (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rocketweb-module-cms-import-export/health.svg)

```
[![Health](https://phpackages.com/badges/rocketweb-module-cms-import-export/health.svg)](https://phpackages.com/packages/rocketweb-module-cms-import-export)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)[angeo/module-llms-txt

Magento 2 module for AI Engine Optimization (AEO). Generates spec-compliant llms.txt and llms-full.txt per llmstxt.org standard, plus streaming JSONL for vector indexing. Multi-store, multi-website, CLI, cron, async admin UI, Page Builder-aware sanitization, customer-group pricing, atomic writes, ETag/Cache-Control, .md mirrors.

111.1k](/packages/angeo-module-llms-txt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
