How to Export and Import CMS Pages and Static blocks ?


The module Magento_CmsSampleData is using a similar system for the import, you can use it to make your own system.

at app/code/Magento/CmsSampleData/composer.json

    "name": "magento/module-cms-sample-data",
    "description": "N/A",
    "require": {
        "php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
        "magento/module-cms": "101.1.*",
        "magento/module-sample-data": "100.2.*",
        "magento/module-theme-sample-data": "100.2.*",
        "magento/sample-data-media": "100.2.*"
    "type": "magento2-module",
    "version": "100.2.0-dev",
    "license": [
    "autoload": {
        "files": [
        "psr-4": {
            "Magento\\CmsSampleData\\": ""

For reference, take a look at the Github repository of the module.


You can manually export/import the cms_block and cms_page's database tables using mysqldump or phpmyadmin.

All the data you need should be in those two tables.


You can use MSP/CmsImportExport.

However the db tables involved are:

  • cms_block

  • cms_block_store

  • cms_page

  • cms_page_store

  1. Go to phpmyadmin
  2. select your database
  3. run the following queries :
select * from cms_page;
select * from cms_block;

Then you can export into csv file. Then you can re use them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.