Hi,
I am Kamal Hinduja based Geneva, Switzerland(Swiss). Can anyone explain How do I customize my theme safely without risking updates breaking those changes?
Thanks
Hi,
I am Kamal Hinduja based Geneva, Switzerland(Swiss). Can anyone explain How do I customize my theme safely without risking updates breaking those changes?
Thanks
Hello @kamal123 ,
I hope you are doing well!
Can you please confirm what would you like to change? It depends on the requirements you have but to customize the theme, Go to Online store >> Themes >> Customize
But I recommend you to take a backup and customize on that theme, to take a backup, go to Online store >> Themes >> Menu >> Click on Duplicate
And customize on new theme
Just never go to ... → Edit code ![]()
Seriously, whatever you do in Customize will stay through your theme updates.
There are 4 main tools:
“Custom CSS” may be picky about code you paste there. It does not tolerate, say page-width or content which limits your options a bit.
Also, CSS mostly responsible for the way how your site looks (and paritally, interacts), you can’t really add more information this way.
NB! You can put your “Custom liquid” inside Header/Footer groups and inside “Template” part of your page. Header/Footer are the same for all pages, so code you add there will run on all pages. Template area – code added there will only run for this specific template, say, only on product pages, only on homepage, etc.
Keep in mind that after you save newly generated block, its code is available under blocks/ path in your theme code, so you should be able to read it and correct your prompt or add some “Custom CSS”/“Custom liquid” to enhance it.
Also – apps. While some apps modify theme code and break its ability to update, most modern apps behave. Unfortunately, you can’t tell which apps are which.
Generally, Apps tend to negatively effect page speed, but some things can’t be done in theme code. Say, “Wishlist” (proper, which will work on multiple devices), “Back in stock” and “Instagram feed” are some of the things which require apps.
Some apps which edit theme code provide their own tools to assist with theme updates.
The replies cover the main approaches well. One thing worth adding: Shopify’s update mechanism only overwrites files the theme developer ships. Any changes you make in the Customize editor - sections, blocks, settings - are stored in your theme’s JSON templates and survive updates cleanly.
Where it gets tricky is Liquid and JavaScript files. If you edit something like product.liquid or theme.js directly, an update will overwrite your changes. The clean alternative is to add a custom snippet or app block and include it through the editor, rather than hardcoding it into the base files.
If you need code edits that go beyond what the editor allows, keep a separate duplicate theme as a reference so you can diff what changed after an update and reapply your modifications.
Hello @kamal123
The safest way is always to duplicate your theme and work on the copy. Make your changes primarily in the theme editor and sections rather than changing core theme files directly, as those are the ones most likely to be overwritten by updates.
Retain your custom code separated in snippets or sections so if you ever need to reapply them it will be much easier. When updating a theme, try out the update on a duplicated version and see the differences. If you are so inclined, Shopify CLI version control also lets you track edits and roll back quickly should you break anything.