Pergunta

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
Foi útil?

Solução

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

Outras dicas

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/

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top