13

Does anyone know any modules that can be used to import/export cms pages (and blocks) in CE?

The scenario I am looking at now is:

  • users (content editors) create pages/blocks with content on a staging website (cloned after live site, different db, different servers)
  • after the pages are being validated, the users create the pages again on the live site (copy-pasting)

Some things to take into consideration:

  • it shoudn't keep a reference to the store views by IDs, rather use the store view code
  • duplicate pages on import should be identified by url key and store views

2 Answers 2

16

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. ;)

3
  • Can you please, provide a Wiki page for this module. This looks quite awesome. Thank you very much :D
    – Thang Pham
    Commented Sep 4, 2014 at 8:50
  • Buddy, Question is How to Import some CMS pages from ONE magento site to ANOTHER, this is waste of time as it syncs thru GIT,SVN. Please answer the question anked. Commented Oct 8, 2015 at 10:19
  • Currently this extension is abandoned.
    – Sergey
    Commented Jan 13, 2016 at 10:32
6

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/

3
  • 1
    this assumes that live is not changed in the meantime... everything gets overwritten. Commented Feb 12, 2013 at 11:18
  • It will not export the static content, which is not in DB and only in files.
    – Kostanos
    Commented Sep 2, 2013 at 17:05
  • MageAnts magento 2 extensions provider company selling cms import export extension will work Commented Jun 2, 2021 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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