We have a magento2 Live site which has only one website at the moment. Now we have a requirement to create multiple websites and We need to replicate cms, blocks and other contents in to the new websites. Is there any script OR ready to use modules available to replicate the site contents into multiple websites?
1 Answer
I manage a website that supports multiple sites for different countries. Out of the box, Magento allows you to select which sites a CMS or block is used. Example, edit a CMS page and there is a "Pages in Website" tab where you can select which sites the content will be visible. Same things with blocks.
I am using M2.3.3 enterprise addition.
regads, mikeg
-
That is understood. But as it is difficult go to each cms page / blocks to assign them to websites, we are thinking of a solution to do it via some sql scripts, any available modules or so. Commented Sep 22, 2020 at 8:24
-
Hey, I don't think it's the best way but you can go to cms_page_store at your database and add the by ID, at the moment you should have something like the ID of the page and at store_id column the same number all the way, when you create a new store check the ID and duplicate every page_id but change the store_id to the new store. you'll have like two rows with page_id for example 2 but one with store_id 1 and other with store_id 2.The same goes to blocks in cms_block_store. Backup your database or that table at least before trying this Commented Sep 22, 2020 at 11:28