Magento 2.1 – Where Are Pages and Blocks Created in Admin Section Stored

blockscms-pagesdatabasedirectorymagento-2.1

I have created blocks in the Magento Admin GUI as well as in the frontend/…/templates directory. Both have been tested and they work fine.

My question are:

  • Where do the blocks and pages that you create in the Magento Admin back-end get stored?
  • Is it in the database?
  • Is it in a directory that I can go into manually and see them?

If the answer turns out to be that they are all strictly stored in the DB, could you please guide me through accessing them/their location in the DB?

I will most likely have to move all the files in the near future to a completely different system and would like to make sure I do not lose anything.

Best Answer

Both in the database:

  • blocks in cms_block table
  • pages in cms_page table

Please note that Magento also stores the relationship between those and the store ids in the following tables:

  • cms_block_store
  • cms_page_store
Related Topic