Upgrading Heavily Customized Shopify Themes Like a Pro

    Introduction: Upgrading a highly customized Shopify theme is not a simple one-click operation. Shopify explicitly warns that when you update a theme containing manual code changes, “Your code changes won’t be included in the updated version.” In other words, the platform will carry over theme editor settings and content (stored in JSON files like settings_data.json), but any custom code (HTML, Liquid, CSS, JS) must be manually merged into the new theme version. This reality has forced Shopify agencies and developers to develop sophisticated workflows with version control, staging environments, and specialized tools to safely merge customizations. The bottom line: upgrading a customized Shopify theme is essentially a full development project, requiring planning, testing, and multiple safety nets to avoid downtime.

    Official Update Process and Its Limitations

    Shopify’s official documentation outlines a cautious manual process for theme updates. When an update is available, you should add the new theme as an unpublished draft (never overwrite the live theme), then review the release notes, and copy over your custom code changes into the new version. Settings and content changes made through the theme editor are automatically copied over – e.g. changed theme settings, sections added/removed, or wording changes are preserved. However, any manual edits to theme files trigger a prominent warning in the Shopify Admin: “Your code changes won’t be included in the updated version. If you want to keep these changes, then you need to copy your code to the new version of your theme.”. Shopify’s updater will only retain non-code customizations (images, text, JSON data, etc.), leaving all Liquid or CSS/JS modifications for you to reconcile.

    In practical terms, Shopify’s recommended workflow is labor-intensive. Developers must diff the old and new theme code to identify changes, then manually merge their customizations into the updated theme files. Shopify provides tools like the Shopify CLI to assist in development – for example, shopify theme pull and shopify theme push allow syncing theme code, and shopify theme dev enables live preview on a development server. But even the CLI has its pitfalls: developers note that shopify theme push will overwrite settings and schema files if not used carefully, often resetting configuration data if a fresh pull isn’t done first. In summary, the official approach gets the job done for simple themes, but for heavily modified themes it’s error-prone and requires meticulous manual effort. This gap between Shopify’s basic tools and real-world needs has led the community to engineer far more robust deployment workflows.

    Multi-Environment Workflows Used by Agencies

    Professional Shopify agencies rarely rely on just a single theme and manual updates. Instead, they implement multi-environment workflows with at least three environments: Development, Staging, and Production. Code is first integrated and tested on a Development theme, then pushed to a Staging theme for client review or QA, and only then deployed to the live Production theme. Version control (Git) is central to this process – teams keep theme code in a GitHub repository and use branches to manage updates. For example, a common setup is to have a dev branch linked to a dev theme, a staging branch linked to an unpublished staging theme, and the main branch linked to the live theme. Continuous Integration pipelines then deploy changes automatically to each environment when a branch is updated.

    Example of a three-environment deployment pipeline for a Shopify theme. Code moves from Development → Staging → Production, with each environment being a separate theme. Integrations with GitHub and CI/CD ensure that each branch’s changes are uploaded to the corresponding Shopify theme for testing and approval.

    This multi-env strategy ensures that by the time code reaches the live store, it has been reviewed and tested in an environment that mirrors production. Leading agencies also emphasize keeping an “instant rollback” plan – for instance, using a duplicate backup theme (or Shopify’s built-in theme version history) so they can revert immediately if an issue is discovered after publishing. Blue-green deployment is a lifesaver during peak seasons: agencies maintain one extra “blue” theme that’s an up-to-date clone of production. When it’s time to deploy changes, they publish the updated theme as the new live version (the “green” theme). If anything goes wrong, they can revert by republishing the untouched backup theme in seconds. These practices have saved many merchants from disaster during Black Friday and other high-stakes times.

    Notably, some agencies choose not to perform tedious line-by-line merges at all for major upgrades – instead, they rebuild the site on a new base theme version. For example, Swanky Agency’s case study on Medley Jewellery describes how they completely rebuilt the storefront on a new Online Store 2.0 theme template rather than merging code, achieving a significant performance boost (Lighthouse score for desktop improved by 38% and conversion rate increased 13% after the upgrade). Rebuilding from scratch can be faster and cleaner for heavily customized sites, because it avoids carrying over years of hacky code. The downside is it requires a full regression test of all features. Agencies will often weigh this option – if a theme has been heavily altered over time, a fresh rebuild on the latest base might be more maintainable going forward. Swanky’s team, for instance, maintained all custom functionality in Medley’s rebuild and treated it as an opportunity to improve site speed and UX, rather than just patching the old theme.

    Git Strategies: Branching and Version Control Best Practices

    Modern Shopify development leverages GitHub not just for code storage but as an active part of deployment. The Shopify GitHub integration allows a theme to sync with a Git branch, so changes pushed to the repo are pulled into Shopify, and edits made in the Shopify editor are pushed back to Git. In theory this keeps code and the live theme in sync, but in practice it introduces complexity. Every change made via Shopify’s editor (even a minor color tweak in the customizer) creates an automatic commit in the repo. Developers have noted that this “commit everything” behavior can clutter the commit history and cause merge conflicts, especially with the critical settings_data.json file that stores theme settings. Best practice is to avoid connecting the live production theme directly to your main development branch – otherwise, if a merchant (or another dev) makes a hotfix in the live theme editor, it will auto-commit and potentially conflict with ongoing development. Many teams instead connect a separate “production” branch to the live theme and treat it as read-only, only merging into it via Pull Requests. One developer describes abandoning a direct main→live link because “Shopify’s automatic pushes made it too annoying to manage,” opting to keep an unlinked live theme and use GitHub only for dev/staging branches.

    Another advanced Git strategy for Shopify is managing multiple stores from one codebase. If you have separate Shopify stores (e.g. for different regions or brands) that share a common theme code, maintaining them in sync is challenging. Series Eight, a Shopify Plus agency, solved this with a branch-per-store model: one main development branch and separate “live” branches for each store (like live/UK, live/EU, live/AUS). Whenever changes are merged into main, GitHub Actions automatically propagate the updates to each store’s branch – excluding JSON content files to prevent overwriting each store’s unique theme settings. The JSON files (which contain things like homepage section layout and store-specific content) are intentionally not auto-merged; instead, developers review those manually or use store-specific config for content differences. This approach allows a unified codebase across stores without risking cross-contamination of settings.

    Illustration of a multi-store Git workflow. A single main branch contains the core theme code. On every update to main, an automated workflow merges those changes into each store’s branch (e.g. live/UK, live/EU, live/AUS), while ignoring JSON template files to avoid clobbering store-specific content. Content or settings changes can be backfilled manually from each live branch into main as needed.

    Even for a single store, Git branching can separate source code from compiled theme code. Shopify’s Theme CLI and GitHub integration only understand the compiled theme structure (the layout/templates/assets folders). If you use a build process (Webpack, Sass, TypeScript, etc.), your source files might live in a /src directory and get compiled to the theme structure. Shopify recommends keeping these separate either by using two repositories or two branches. A popular method is a monorepo with two branches: for example, a source branch that contains your raw source code (with build scripts, package.json, etc.), and a production branch that contains the compiled theme ready to deploy (no src folder, only theme files). The production branch is what connects to Shopify. With this setup, developers work in the source branch and compile, then push the build output to the production branch (sometimes using Git subtree or a CI script). Any changes made through the Shopify editor (which affect compiled theme files or settings) then have to be backfilled – manually copied back into the source code – to avoid getting lost on next build. It’s extra work, but it keeps the commit history clean and separates development concerns. In short, never mix your unbuilt source files with the live theme code in the same branch; you’ll end up with a mess of commits (for example, auto-generated style.css files showing up in version control). Instead, isolate compiled code either in its own branch or repo. This discipline makes it far easier to update base themes – you can pull the latest version into a parallel “upstream” copy of the theme and use a three-way diff tool to merge changes.

    Speaking of diffs: a pro tip from the community is to use a three-way merge tool for updating themes. With a three-way compare, you load three versions of a file – for example, (1) your current customized theme file, (2) the original base theme file that your version was forked from, and (3) the new base theme file from the updated theme release. This allows you to see what the theme developer changed (diff between 2 and 3) and what you changed (diff between 2 and 1), and merge accordingly. Tools like Meld are popular for this process. In particular, merging Shopify’s JSON files (which often have keys reordered by the theme editor) is much easier with a 3-way merge that can auto-align and highlight changes. As one expert notes, having an “upstream” copy of the untouched theme is crucial for this: maintain a copy of the exact base theme version your store is running (before update), so you can use it as the merge base against the new version. This way, you’re not blindly comparing your theme vs. the new version; you have the context of the original to guide what changed.

    Continuous Integration and Deployment (CI/CD) for Themes

    To streamline the deployment process, many teams have introduced CI/CD pipelines dedicated to Shopify themes. Tools like Buddy and GitLab CI allow automated building, testing, and deployment of theme code on every Git push. For instance, Buddy CI provides a Shopify integration that can deploy only the changed files to a theme (using a changeset-based deployment), which significantly speeds up the upload process. It also offers handy actions like running Lighthouse performance audits as part of the pipeline and Shopify Theme Check (linting) before deployment. This means you can catch Liquid syntax errors or performance regressions automatically, before they ever hit the live store. CI pipelines typically run tasks such as: compiling assets (if you use Sass or TypeScript), running unit tests (for any theme scripts), linting Liquid code, and then deploying to a Shopify theme. Some teams even integrate visual regression tests or use Shopify’s Theme Inspector to profile rendering speed on each build.

    Platforms like DeployHQ and GitHub Actions also support Shopify deployments. DeployHQ, for example, lets you run build commands (Webpack, Gulp, etc.) in an isolated environment and then upload the compiled theme files to Shopify – so you don’t have to commit compiled assets into Git at all. It essentially bridges the gap by performing “build → deploy” in one step. GitHub Actions can similarly be configured to run shopify theme push on certain branches. In one public example, developers set up a GitLab CI pipeline where any push to a feature branch auto-deployed a preview theme (for QA to review), and push to main branch deployed to a staging theme, etc.. This kind of pipeline turns theme updates into a controlled release process, much like software deployments, with the ability to test every change in a real Shopify environment (via preview URLs) before it goes live.

    Another benefit of CI automation is preventing human error. Forgetting to pull latest theme code, or missing a file when copying changes, are common mistakes in manual updates. Automated diffs and deployments ensure that nothing is inadvertently left out. They also enable parallel development: multiple developers can work on separate feature branches which each deploy to their own preview theme. Once tested, those features can merge into the main branch for a coordinated release.

    Of course, even with CI/CD, one should remain vigilant about backup and rollback. It’s wise to script an automatic theme backup before any deployment (for example, Buddy can export the theme or you can use Shopify’s Theme Kit to download a copy). Shopify themes do have a primitive version history (you can undo changes to a file or roll back to a previous theme version by duplicating themes), but these are not robust for full recovery. Many teams use dedicated backup apps like Rewind or ThemeWatch to snapshot their theme and store data. Rewind, for instance, can “automatically back up your Shopify store and quickly restore products, themes, and customer data…undo unwanted changes with one click.” This kind of one-click restore is invaluable if a deployment goes awry – you can revert the theme to pre-deployment state in moments. In addition, maintaining a staging theme that is an exact copy of production is a good fail-safe: if a new update fails, you can literally republish the previous theme (which was kept in your library as a backup).

    Specialized Tools to Preserve Customizations

    Given the challenges of merging theme code, a number of apps and tools have emerged to assist developers:

    • Theme Updater & Backups (Out of the Sandbox) – This app (by a leading theme developer) automates much of the theme update process. It uses AI to analyze your current theme and the new version, and automatically applies as many custom code edits as possible to the new version. It highlights any conflicts for you to manually resolve. It also creates backup copies of your theme and even monitors for Shopify outages. Theme Updater has a free tier for basic updates, and a Pro plan (~$9/month) that enables one-click “AI-powered” updates preserving code customizations, plus email alerts for new theme releases. While no tool can perfectly merge every scenario, many merchants find it dramatically reduces update time. With over 250 reviews and a ~4.1 star rating on the app store, it’s a proven solution for popular themes. Best practice: even when using such tools, review the output in a staging theme to ensure no custom feature was lost in translation.
    • DiffMate – Theme File Comparison – This free app provides a visual diff tool for Shopify themes. You can select any two themes in your store (say, your current theme and a new updated version) and DiffMate will show you a side-by-side comparison of every file that differs. It can filter to just changed files and even compare images. One killer feature is the ability to copy changes with one click from one theme to another. For example, after comparing, you can click to apply a missing code change from your old theme into the new theme directly in the app’s editor. This greatly speeds up the merge process and reduces human error. Essentially, DiffMate provides an interactive checklist of “here’s everything that changed between versions” so you don’t overlook anything during an update.
    • ThemeFlow – GitHub Actions for Themes – This is a newer app that brings Git-centric workflow automation into Shopify. It’s aimed at teams using GitHub integration, providing pre-built merge and deployment flows. For instance, ThemeFlow can detect changes on a branch and automatically merge theme branches or deploy themes according to rules. It supports multi-store code sharing and scheduled or triggered merges. Think of it as a layer on top of Shopify’s GitHub integration, adding features like cherry-picking commits or triggering theme publish events. ThemeFlow essentially attempts to fill the gaps to make a more complete CI/CD pipeline within Shopify for those who prefer an app-based solution.
    • Backup and Versioning Apps – In addition to Rewind mentioned earlier, other apps like ThemeWatch and ThemeSafe focus on theme backups. These can automatically save theme file versions daily or on demand, and allow one-click restore of an entire theme (useful if an update goes horribly wrong). Some also track changes over time. While Git provides version control for code, backup apps capture everything in the Shopify store (including settings and content). Using a combination of both is wise: Git for your code history, and a backup app for the store data and emergency recovery.

    In summary, a robust “upgrade toolbox” might include a diff tool (DiffMate or even manual Git diffs), an updater utility (Theme Updater app or the Shopify Theme Inspector for Chrome), and a backup solution (Rewind or similar). These tools don’t eliminate the need for developer oversight – but they can eliminate busy-work and catch mistakes. Automated diffing, in particular, addresses the biggest pain point: knowing exactly what the theme developer changed in the new version and what you customized in the old version. Armed with that knowledge, you can merge confidently.

    Key Best Practices for Smooth Theme Updates

    Upgrading a customized theme will never be fully “hands-off,” but following these best practices will ensure a smooth, professional process:

    • Plan Updates Like Software Releases: Treat a theme upgrade as a mini software project. Scope out the changes, schedule downtime or low-traffic deployment windows, and allocate sufficient developer hours (major version upgrades can take 20–40 hours for heavily customized stores – plan accordingly).
    • Use Multiple Environments: Never edit or update the live theme directly. Always use a development theme for integration and a staging theme for final testing. Only publish the new version after it’s been vetted on staging by your team and the store owner. This prevents nasty surprises on the live site.
    • Leverage Git and CI/CD: Maintain your theme code in Git, and use branches to control deployments. Implement CI scripts or apps to automate builds and deployments to your dev and staging themes on every commit. This catches issues early and makes the deployment process repeatable. Protect the main production branch – use Pull Requests and code reviews for any changes that will go live.
    • Document and Comment Custom Code: When you do customize theme code, leave comments (<!-- custom code for XYZ -->) and keep a change log. This is invaluable during an update merge – you’ll know what code blocks were custom vs. stock. It also helps to have an “upstream base” copy of the theme (unmodified) for reference.
    • Use Diff Tools for Updates: When a new theme version releases, perform a thorough diff between your current theme and the new version. Identify all code differences. Tools like DiffMate or Meld can speed this up by highlighting changes and even merging for you. Don’t rely on memory or manual checking – it’s too easy to miss a small snippet.
    • Don’t Overlook Settings and Content: Remember that new theme versions might introduce new settings or sections. Manually port over any JSON from templates/*.json and config/settings_data.json carefully if not done automatically. Conversely, be mindful that your existing settings_data.json will overwrite the default settings in the new theme – some of those defaults might be needed for new features. Always review the theme settings in the customizer after an update.
    • Backup Before and After: Always create a backup (duplicate theme) before you begin an update. And after you finish merging and testing the new version (prior to publishing it), download a copy or use a backup app to snapshot it. This way, you can roll back or even start over if needed. Shopify allows duplicating themes in the admin with one click – use this liberally to create “save points.”
    • Test Thoroughly: Test the updated theme in staging across all critical flows: add-to-cart, checkout, product filtering, etc., on multiple devices and browsers. Pay special attention to any custom apps or scripts – ensure they still work or have been re-integrated. Also test site speed (compare Lighthouse scores) to catch any performance regressions early.
    • Have a Rollback Plan: Despite best efforts, things can go wrong on deployment. Make sure you have an immediate rollback plan: for example, keep the previous theme version unpublished in the theme library. If a serious issue appears on the live site, you can quickly republish the old theme (or use an app’s one-click restore) to minimize disruption. In high stakes periods (holidays), consider delaying theme updates entirely unless they’re absolutely necessary.

    Conclusion

    Upgrading a customized Shopify theme is undeniably challenging – but with the right approach, it’s manageable and can even be routine. The key is recognizing that automation can assist but not fully replace developer insight. Shopify’s platform provides a solid foundation (Theme CLI, GitHub integration, theme checkpoints), and on top of that the ecosystem now offers powerful tools to fill the gaps (CI/CD pipelines, update apps, diff utilities). The most successful teams combine these tools with disciplined workflows: multi-environment testing, strict version control, detailed documentation of customizations, and backup/rollback strategies.

    At the end of the day, an updated theme is only a success if the store’s functionality and conversions are preserved (or improved). This means zero downtime, no missing features, and hopefully some new benefits from the latest theme version. Reaching that point requires an investment in process. As we’ve seen, leading Shopify agencies treat theme upgrades not as a trivial task but as a full development cycle – complete with project timelines, QA, and often performance improvements as a bonus outcome. By planning meticulously and using the best practices outlined above, Shopify developers and CTOs can upgrade customized themes “like a pro,” keeping their storefronts modern and secure without sacrificing the custom touches that drive their business. In ecommerce, you can’t afford surprise breakages or downtime, so approach your next theme update with the rigor it deserves. With the right workflow, you’ll reap the benefits of Shopify’s latest features and optimizations, while keeping your hard-earned customizations intact.

    Leave a Reply

    Your email address will not be published. Required fields are marked *