Why do theme updates wipe out all my custom code, fonts, and templates?

Updating or switching your Shopify theme version doesn't carry over custom code, fonts, or templates automatically — here's how to migrate without losing work or your storefront.

themesmigrationscustom-codetheme-updateversion-control

What's going on

Every time you update your Shopify theme to a new version, or switch to a redesigned version of the same theme, you find that your custom code, fonts, and product templates just... disappear. The custom CSS you added for that banner, the extra product template you built for a special collection, the font you picked out months ago — none of it survives, and you're left manually hunting through the new theme trying to figure out what broke and what you need to rebuild.

This isn't a bug — it's how Shopify themes work. A theme update or a new theme install is treated as a distinct theme in your admin, not a patch applied on top of your existing one, so nothing about custom edits carries forward automatically. The pain is real, though: merchants report doing this migration dance repeatedly as themes get updated, and each time the risk of losing something or introducing a regression goes back up to zero.

Why it happens

Shopify treats each theme version as its own independent copy of files in your theme library, not a delta on top of the one before it. When you update a theme (or install a newer version of a theme you bought), Shopify doesn't know which of your changes were intentional customizations versus which files are just the theme's own code — so it can't merge them, and doesn't try.

This got more pronounced with Online Store 2.0 themes, where templates are stored as JSON files referencing sections and settings rather than as single .liquid files. That's more flexible for merchants using the theme editor, but it also means a template you customized in the old theme structure doesn't map cleanly onto the new theme's JSON template of the same name — the file formats and section references can differ even when the visual result looks similar.

Custom code added directly into theme files (rather than through app blocks or the theme editor's supported customization points) is especially fragile here, because it lives inside files that get wholesale replaced by the new theme version rather than in a layer Shopify tracks separately.

5 ways to fix it

1

Duplicate first, then diff — never update your live theme directly

Before touching anything, go to Online Store > Themes and duplicate your current live theme (or download it as a zip via the Shopify CLI). This duplicate is your rollback copy and your reference point for exactly what customizations existed before the update. Only after that exists should you install the new theme version as a separate, unpublished theme in your theme library — Shopify lets you have up to 20 themes on a store, so there's room to keep the old one around during the whole migration.

2

Inventory your customizations before you start migrating anything

List out every place you added custom code: edited section/snippet .liquid files, custom CSS or JS in assets, extra template JSON files (Online Store 2.0 themes store templates as JSON, which is why they don't merge cleanly across theme versions), added metafields or app blocks, and any settings_data.json values like fonts and colors picked in the theme editor. A simple spreadsheet with file name, what was changed, and why makes the next steps far less error-prone than trying to remember it under pressure.

3

Use the Shopify CLI (or GitHub integration) to get a real file diff

Pull both the old and new theme code locally with `shopify theme pull` and run them through a standard diff tool (VS Code's compare, `git diff`, or similar) instead of eyeballing the admin editor. This surfaces exactly which files changed structurally versus which just need your custom snippets re-applied. If you connect a theme to GitHub, Shopify treats that branch as the source of truth and will warn you before letting anyone overwrite it from the admin, which is a useful guardrail during a migration.

4

Migrate selectively, test on the unpublished theme, then publish

Re-apply your custom code, fonts, and template JSON piece by piece into the new theme version (or new theme) while it's unpublished, checking storefront previews as you go rather than doing a single big-bang copy-paste. Only publish once you've verified checkout, product pages, and any custom templates render correctly, and keep the original duplicate theme dormant in your library for at least a few weeks in case something surfaces post-launch.

5

Consider a lightweight version-control habit going forward

The recurring version-drift problem usually comes from theme changes happening in the admin editor with no record of what was touched. Keeping the theme in a Git repository (via the CLI or GitHub connection) going forward, even informally, turns future updates into reviewable diffs instead of guesswork, and is worth setting up once rather than repeating this manual audit every time.

Bottom line

There's no Shopify feature that auto-merges your customizations into a theme update — duplication, inventory, and selective re-application (backed by a real diff and a rollback copy) is the reliable path, and it's mostly a discipline problem rather than a tooling gap. If this keeps happening every theme update, the fix is establishing a lightweight version-control habit (Shopify CLI or Git) rather than reaching for an app, since no app can safely automate judgment calls about which custom code should carry forward.

Still Stuck?

Browse the rest of the problem library, run a free storefront scan to catch issues like this automatically, or email us and we'll work out a custom solution for it.