5

How to Export and Import CMS Pages and Static blocks ?

1

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": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Magento\\CmsSampleData\\": ""
        }
    }
}

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

0

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.

0

You can use MSP/CmsImportExport.

However the db tables involved are:

  • cms_block

  • cms_block_store

  • cms_page

  • cms_page_store

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.