Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am trying to develop the whole site locally first with all the data. When I will be DONE, I will push it to live.
But everyday when I am starting the project using CLI command "shopify theme dev", I get to see that all my previous added data/content, is lost. Whereas the image files are still there in the media library. But none of the blocks retain their content in their respective fields.
How is all the data getting lost everyday? I am very much confused, is this a bug in Shopify? Please check the video link here to refer to my issue & help me out.
https://www.awesomescreenshot.com/video/22149841?key=68e18f91e66f383ff04878f2f44d7457
Before you run shopify theme dev you need to create a deleopment theme to pull your changes from the customizer using the shopify theme pull command and only then run shopify theme dev. Because when you save your changes in the customizer, your settings_data.json is not changed locally
Hello Maxdanko,
When I am developing locally using Shopify CLI then none of the data i have added during my work stays after push. All the data that i have added during development from local gets lost.
Thanks
Thank you for your reply. To solve this problem you should create a development theme in your store and upload your code there, then you need to open two shopify cli terminals in one run shopify theme dev --store [store-name.myshopify.com] --theme [your_theme id from store]. After making changes in customizer you need to run shopify theme pull --store [store-name.myshopify.com] --theme [your_theme id from store] to pull down the changes, and after re-running shopify theme dev ... your changes from the customizer will remain. The shopify theme dev command sends the changes you had in your code but does not take them out of the customizer
Hello Maxdanko,
In the live site when I am adding the content in the home-page, then those data are actually found in the file index.json, please check the screenshot below.
But when I am working locally using Shopify CLI with local frontend url then after adding the data from the customize theme editor link, those data are not found in the index.json file, please check the screenshot below.
The data in the index.json file are not getting generated when I am working locally using Shopify CLI. Can you please explain why?
Thanks
Because in your case cli creates a virtual development environment that is not related to the store, so the changes from the customizer will not be applied
For anyone that finds this question while looking for an answer. The answer is to use the --theme-editor-sync flag
Synchronize Theme Editor updates in the local theme files.
see doc https://shopify.dev/docs/api/shopify-cli/theme/theme-dev
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025