Shopify Theme Updates & Custom Templates: Why Your Pages Disappear and How to Fix It
Hey everyone! As a Shopify migration expert, I spend a lot of time diving into the community forums, and a recent discussion caught my eye. It’s about a pretty frustrating issue many store owners face: custom page templates mysteriously vanishing after a theme update. This isn't just annoying; it can totally disrupt your carefully crafted pages and feel like a major setback.
Let's talk about a specific case that came up in the forums, titled "Horizon updates cause newer pages to change template?". Our community member, anon26642340, was using the Horizon theme and noticed a troubling pattern: after theme updates, any newer pages they'd created (since the last update) would revert to the default page template. Older pages were fine, but their new "podcast" page, for example, kept getting booted off its custom template, even though the Admin settings still showed it assigned correctly!
It’s a head-scratcher, right? You build a beautiful custom page, assign a unique template, and then a routine update seems to undo all your hard work. Anon26642340 even mentioned losing two other pages in a previous update, thinking it was a fluke. But two times? Definitely not a fluke.
Understanding Why Your Custom Templates Vanish
Thankfully, a super helpful community member, Vlad_Gerasimchuk, jumped in with a brilliant explanation that really demystifies what’s happening. This isn't you doing anything wrong, folks, and it's not random at all. It's about how theme updates interact with your custom page templates.
When you create a new page template using the theme editor (like anon26642340's "podcast" one), Shopify saves it as a JSON file within your theme's directory. Think of it like templates/page.podcast.json. Now, here's the kicker: when a theme like Horizon gets an update, it essentially replaces the theme's core files with the new version. Any template JSON that came with the previous version of the theme usually survives this merge.
But a custom template you added since your last update? That’s not part of the standard files the updater is looking to merge or preserve. So, it can get dropped or reset. Once that crucial JSON file is gone, the page has nothing specific to point to, and Shopify gracefully (but inconveniently!) falls back to the default page.json template. That's exactly the pattern anon26642340 was seeing: old pages were fine, but pages created since the last update got reverted. It's a technical nuance, but a crucial one for anyone doing custom work!
Confirming the Issue & Proactive Steps
Vlad offered some excellent advice to confirm this is indeed what's happening and, more importantly, how to prevent it in the future.
Before You Update: Always Duplicate Your Theme!
This is your first and most critical line of defense. Before you ever hit that "Update" button, go to your Shopify Admin > Online Store > Themes. Find your live theme, click the "..." menu, and select "Duplicate." This gives you a complete rollback point that includes all your current template files. As Vlad wisely points out, the version history in the code editor doesn't always restore these custom JSON files.
Checking for Missing Templates
If you're already experiencing the issue, you can check on the broken version (e.g., Horizon 4.1.3 in anon26642340's case):
- Go to your Shopify Admin > Online Store > Themes.
- For the theme version that's causing trouble, click "Actions" > "Edit code."
- In the code editor, look under the
templates/directory for your custom template file, likepage.podcast.json.
If it's missing or looks like it's been reset to a default structure, that confirms the update dropped it, and the Admin assignment reverting to default is just a symptom.
The Actual Fix: How to Recover & Protect Your Custom Templates
Now for the good stuff – how to actually fix this and make your custom templates resilient to future updates. This is a bit tedious, but it's a solid workaround:
- Duplicate Your Theme (Again, for Safety!): Always start here. Create a duplicate of your current live theme as a backup.
-
Copy Custom Template Contents: For each custom page template you have (e.g.,
page.podcast.json), go into the code editor, open the file, and copy its raw contents (the JSON code) into a plain text file on your computer. This saves your section setup outside the theme itself. - Update the Duplicate Theme: Apply the new Horizon update (or whatever theme update you're doing) to the duplicate theme you just made.
- Recreate Missing Templates: If your custom templates are gone after the update on the duplicate theme, you'll need to recreate them.
- In the code editor of your updated duplicate theme, go to the
templates/directory. - Click "Add a new template" and choose "Page". Give it the exact same name as your original custom template (e.g.,
podcast). This will create an emptypage.podcast.jsonfile. - Paste the saved JSON content from your text file into this new
page.podcast.jsonfile. - Reassign Pages: Go back to your Shopify Admin > Content > Pages. For each page that uses a custom template, edit the page and reassign it to its correct template in the page's Admin settings.
This method survives future updates better because you're essentially re-introducing your custom templates after the core theme files have been updated, and the updater is less likely to touch files it doesn't recognize as part of its official package. It’s a bit of extra work, but it saves you from losing valuable content.
Devcoder also chimed in asking for specific URLs and screenshots, which is a common first step for support, but Vlad's deep dive into the 'why' and 'how-to' really gets to the root of the problem. ![]()
A Note on Reporting Bugs
Since this issue is reproducible across multiple updates and specifically affects new custom templates, Vlad suggested it's definitely worth Shopify seeing it as a possible Horizon updater bug. If you encounter this, consider submitting a support ticket to Shopify with before-and-after screenshots of your page template assignments. The more data they have, the better they can refine these update processes.
So, there you have it! Theme updates don't have to be a scary guessing game anymore. With a little proactive backup and understanding how those .json files behave, you can keep your custom pages safe and sound. It's all about being prepared and knowing the technical nuances of your Shopify store. Happy updating! ![]()