Latest news

How To Import/Export CMS Pages & Static Blocks In Magento 1

1 comment

Sometimes, your e-commerce website is on the localhost or on a different server with your live site, whereas you create all CMS pages & static blocks on dev site. Therefore, it is troublesome to import/ export CMS pages & static blocks from the dev to the live site. This tutorial will help you to solve this problem at ease.

In Magento 1, all CMS pages and static blocks are saved in the following 4 tables:

  • cms_page
  • cms_page_store
  • cms_block
  • cms_block_store

Hence, if you need to copy the content, just simply export data from these tables and then import again to your live site database. It can be done easily through Phpmyadmin.

In Phpmyadmin, let’s click on the Export button. On the Export page, you must select the 4 above options and check on the Data column to export them.

import-export-cms-pages-static-block-magento

After that, go to Phpmyadmin of your live site and select Import function to import the file again.

In case you don’t have Phpmyadmin, it will be more complicated. You have to use the SSH command to export and import these tables. Here are 2 commands to export and import specific tables in a database:

Export: mysqldump -u -p database_name cms_block cms_block_store cms_page cms_page_store > content.sql

Import: mysql -u -p database_name < content.sql

If you import/ export CMS pages and static blocks by this way, it would help you to save a lot of time. Hope that you guys find this tutorial useful. See you in the next tutorial.

See Also:

Is upgrading your e-commerce website to Magento 2 a good idea?

[VIDEO] How To Install Magento 2 With No Error In 7 Minutes

5 Common Magento 2 Issues That Can Ruin Your Store

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...
ThomasHow To Import/Export CMS Pages & Static Blocks In Magento 1

Related Posts

1 comment

Join the conversation
  • Barbara Glowam - June 30, 2017 reply

    Thanks for sharing such a useful information.
    If want to do these task with the help of extensions then you can try StaticBlockImportExport and CategoryImportExport Magneto 2 Extensions. Both of extensions transfer all your static block and categories from old site to new site without any core file change.

Leave a Reply

Your email address will not be published. Required fields are marked *