Import/Export CMS Pages / CMS Blocks

On the last Hackathon we developed a module which will help you to achieve this:

https://github.com/magento-hackathon/firegento-contentsync

It will store the content in a json file, which can be synced to another server (already integrated are git and svn support). It still uses the store views by ID, but pull requests are strongly appreciated. ;)


You can do export/import cms pages/static blocks easily via SSH.

  1. Export:

    mysqldump -u [username] -p[password] [database] cms_page cms_page_store cms_block cms_block_store | grep INSERT | sed 's/INSERT INTO/REPLACE INTO/' > cms-export.sql
    

    Note: Don’t forget to add prefix to cms_* tables if you have prefixed your tables.

  2. Import:

    mysql -u [username] -p[password] [database] < cms-export.sql
    

[ Make sure to backup your database before any import operation ]

REF: http://www.blog.magepsycho.com/export-import-cms-pages-static-blocks-via-ssh/

Tags:

Import

Cms