Sometimes, when working on your theme files, you may find you need to revert to a previous version.
This might occur if you make an error editing your theme files and "break" the theme or you find that a third party app modified your Liquid code that now needs to be removed or edited.
Luckily, Shopify has a built in feature that tracks the changes you make to your theme and lets you rollback to previous versions. Full instructions for this are located here.
A few notes about this tool:
- Before you begin customizing your theme files, always consider these points.
- Sometimes it's helpful to use this feature to see how your code changed over time. You can browse through versions and see how your code changed, but keep in mind the code won't be live until you hit "save" — which is perfect if you just need to reference old code but don't want to undo it.
- It's also worth noting that there's no guarantee that previous versions of theme files will always be accurate or accessible. which is why, to be absolutely sure, we always recommend a manual or "quick" backup of code.