E-Commerce Updated

How to Build a Custom Shopify Theme From Scratch: Best Tutorial

Jane Vyshnova

Jane Vyshnova

CEO

Author

Daria Diachenko

Daria Diachenko

Copywriter

Author

How to Build a Custom Shopify Theme From Scratch: Best Tutorial

Time to read: 15 minutes

Content

  1. What is Shopify Online Store 2.0?
  2. Shopify Online Store 2.0 Changes
  3. Benefits Of Shopify Online Store 2.0
  4. Custom theme, customised theme or an app?
  5. Plan the theme before crafting it
  6. Start from Skeleton: Timber and Theme Kit are retired
  7. Make Liquid your best friend
  8. The theme review process is part of the task
  9. Make sure to match CSS and template structures
  10. Variety of Ecommerce Theme Builders
  11. Cost to Develop a Custom Theme
  12. Best Shopify Custom Theme Development Recipe: Conclusion
Bookmark

To build a custom Shopify theme from scratch today, install Shopify CLI, start from Shopify's Skeleton theme with shopify theme init, build JSON templates, sections and blocks in Liquid, preview on a development store with shopify theme dev, lint with shopify theme check, then upload with shopify theme push --unpublished and publish when it passes your acceptance checks.

Two warnings before you start. First, older tutorials, including the first version of this one, relied on the Timber framework and Theme Kit. Shopify archived Timber in 2018 and now marks Theme Kit as deprecated, so skip any step that depends on them. Second, "from scratch" is not always the right call. If an existing Online Store 2.0 theme covers most of your pages, customising it is usually cheaper to build and maintain; a custom theme pays off when your design, content model or performance targets cannot be met that way and you are ready to own the code.

This tutorial explains what Online Store 2.0 changed, how to decide between a custom theme and a customised one, the current build workflow with the commands to run, and a checklist you can use to accept a theme from your own team or from a partner.

What is Shopify Online Store 2.0?

Online Store 2.0 is Shopify's name for a set of theme and theme-app features that Shopify announced at its Unite 2021 event. In Shopify's words, it is "a set of features and feature improvements that make themes and theme apps easier to build". It is not a separate product or a new theme. The core ideas are:

Themes built before these changes are often called vintage themes. Shopify says merchants "can continue using a vintage theme if it meets their needs", so upgrading is a business decision, not a forced migration. If you build a new theme today, build it the Online Store 2.0 way.

Shopify Online Store 2.0 Changes

For developers, the change is architectural. A theme now has a predictable structure, and each layer has one job:

How an Online Store 2.0 Shopify theme renders a page Five layers from outside in. 1, layout/theme.liquid: the page shell that must output content_for_header and content_for_layout. 2, templates such as product.json: a JSON template lists which sections appear and in what order. 3, sections and section groups: reusable Liquid modules with a schema; header and footer groups. 4, blocks: theme blocks in the blocks folder can be reused and nested; app blocks come from installed apps. 5, snippets: small reusable pieces of code. Supporting folders: config for theme settings, locales for translations, assets for CSS, JavaScript and images. Footer: merchants arrange sections and blocks in the theme editor; developers write the Liquid behind them. How a Shopify theme renders a page Online Store 2.0 structure, outside in 1 layout/theme.liquid Page shell for every template 2 templates/product.json Lists the sections and their order 3 sections/ + section groups Modules with a schema; header, footer 4 blocks/ and app blocks Reusable, nestable; apps add their own 5 snippets/ Small reusable pieces of Liquid Supporting folders config: settings · locales: translations assets: CSS, JavaScript, images Merchants arrange sections and blocks in the theme editor; you write the Liquid.
How an Online Store 2.0 theme renders a page. Each layer has one job, which is what makes a custom theme maintainable.

Benefits Of Shopify Online Store 2.0

The benefits are practical rather than magical. Online Store 2.0 does not raise sales or traffic by itself; what it changes is who can change the store, and how safely.

Merchants change pages without code

Because templates are lists of sections, a merchandiser can build a landing page, reorder a product page or add a size-guide block in the theme editor. Your developers stop being the bottleneck for routine content work.

Apps stop editing your theme files

App code is packaged in app blocks that merchants control in the theme editor, so integrations no longer depend on code pasted into templates by hand, which is the code that tends to break when a theme is updated or an app is removed.

Product content comes from data

With metafields as dynamic sources, the same template can show different specifications, materials or documents per product. That keeps the number of templates small and the content consistent.

Upgrades and handover get easier

A theme built from small, named sections and blocks is easier to test, review and hand over to another team than a theme built from long template files.

Custom theme, customised theme or an app?

Most "we need a custom theme" requests are really one of three different jobs. Use this table to decide which one you are buying before anyone writes code.

Your situationUsually the better routeWhy
An existing Online Store 2.0 theme fits most pages; you need brand styling and a few new sectionsCustomise the existing themeYou keep the theme's tested templates and only own your changes
You need a feature such as a configurator, a bundle builder or a printer integrationBuild an app or app block, keep a standard themeThe feature lives outside the theme and survives theme changes
Your design system, content model or page performance cannot be met by any available themeBuild a custom theme from SkeletonYou control every template, but you also own every future fix
You plan to sell the theme to other merchants on the Theme StoreBuild from Skeleton and follow the Theme Store requirementsShopify accepts new submissions only on that codebase

A Dinarys project shows the second route in practice: custom logic outside the theme, in an external configurator plus a private app. For Lappu, a Swedish online shop for personalised identification stickers, the case page describes a Shopify website built on a ready-made theme with custom branding, a custom sticker configurator built with Laravel and React and integrated with Shopify through webhooks, and a connector for the client's Roland printer uploaded as a private Shopify app. The case page describes the project at its last pre-launch stage and claims no live-store results; it is cited here only for the decision to keep the theme standard and put the custom logic outside it.

Plan the theme before crafting it

Technical knowledge is only half of the preparation. Before you build your own Shopify theme, review the existing theme options and write down what they lack for your niche, such as richer product demonstrations, a different catalogue structure or a layout your brand needs. If the new theme does not differ in a way your customers will notice, it is not worth the time.

What shoppers generally want has not changed much:

Turn those wishes into a plan the developers can build against:

  1. List the page types you need (home, collection, product, cart, search, blog, article, standard pages, customer pages) and the templates for each, including alternate product templates.
  2. List the sections and blocks merchants need on each template, with their settings. This becomes your section library and the main driver of effort.
  3. Define the content model: which product facts come from metafields or metaobjects, and who maintains them.
  4. Set performance and accessibility targets. Agree measurable Lighthouse targets for the home, collection and product pages on desktop and mobile; the Theme Store floors described in the review section below are a sensible minimum even for a theme you will never submit.
  5. Decide which apps stay. Each app that injects scripts affects speed; replace the ones whose job the theme can do itself.

If you create a Shopify theme from scratch for a client rather than for yourself, agree these lists in writing first. Custom development is not cheap, so do not start without a clear picture of the result.

Start from Skeleton: Timber and Theme Kit are retired

Earlier versions of this tutorial recommended the Timber framework and Theme Kit. Both are now history. Shopify's Timber repository was archived on 30 August 2018 with the note that the theme "is no longer being maintained by Shopify", and its successor Slate reached end of support in January 2020. Shopify's documentation now states: "Theme Kit is deprecated." The current toolchain is Shopify CLI plus the Skeleton theme, which Shopify describes as "a minimal, carefully structured Shopify theme designed to help you quickly get started".

Here is the current workflow, step by step.

  1. Prepare access. Install Shopify CLI, create a development store, and make sure you are the store owner or have a collaborator or staff account with the Themes permission.
  2. Create the theme. Run shopify theme init. It clones the Skeleton theme repository to your machine as the starting point.
  3. Preview while you build. Run shopify theme dev --store your-store.myshopify.com. The CLI uploads the theme as a development theme and serves a local preview at http://127.0.0.1:9292, so you can see changes as you save files.
  4. Build templates, sections and blocks. Add JSON templates for each page type, then the sections and theme blocks from your plan. Keep repeated markup in snippets.
  5. Lint continuously. Run shopify theme check. Shopify describes Theme Check as "a linter for the Liquid and JSON inside your theme"; the CLI command runs it "to analyze your theme code for errors and to ensure that it follows theme and Liquid best practices".
  6. Upload for review. Run shopify theme push --unpublished the first time, then shopify theme push for updates. shopify theme share uploads the theme as a new unpublished theme if you only need a preview link for stakeholders.
  7. Publish. When the theme passes your acceptance checklist, run shopify theme publish. Use shopify theme package if you need a ZIP file, for example for a Theme Store submission.

Use shopify theme info whenever you are unsure which store the CLI is connected to, and shopify theme pull to bring down changes merchants made in the theme editor before you push again, so you do not overwrite their content.

Make Liquid your best friend

Liquid is "a template language created by Shopify" and an open-source project. You need it to build a Shopify theme and to make anything beyond cosmetic changes to an existing one. Do not be intimidated: the syntax is small, and three building blocks cover most of it.

Liquid sits between the merchant's data and the HTML the shopper's browser receives. Write templates that are agnostic to a single product: the same section should work for every item, with differences coming from settings and metafields. This matters most if you build themes for several merchants, but it also keeps your own store's templates few and consistent.

A minimal section shows the pattern. It outputs a heading from a setting and lets merchants add, remove and reorder points as blocks:

{% comment %} sections/feature-callout.liquid {% endcomment %}
<div class="feature-callout">
  <h2>{{ section.settings.heading | escape }}</h2>
  {% for block in section.blocks %}
    <div {{ block.shopify_attributes }}>{{ block.settings.text }}</div>
  {% endfor %}
</div>

{% schema %}
{
  "name": "Feature callout",
  "settings": [
    { "type": "text", "id": "heading", "label": "Heading" }
  ],
  "blocks": [
    { "type": "point", "name": "Point",
      "settings": [{ "type": "richtext", "id": "text", "label": "Text" }] }
  ],
  "presets": [{ "name": "Feature callout" }]
}
{% endschema %}

Shopify's Liquid reference lists every object, tag and filter; keep it open while you work, and use shopify theme console, Shopify's Liquid REPL, when you want to try an expression before you put it in a template.

The theme review process is part of the task

If you plan to publish your theme on the Shopify Theme Store, read the requirements before you design, not after. The current rules are strict:

You submit the theme ZIP file and the listing information through the Partner Dashboard, and Shopify expects the theme to be fully built and tested by then. Even if the theme is only for your own store, these rules make a useful quality bar, and checking against them during development is far cheaper than fixing a finished theme.

Make sure to match CSS and template structures

Development and maintenance are very different things. To keep maintenance efficient, take a modular approach: match the structure of your CSS to the structure of your sections and blocks, so each section's styles live with or next to that section and can be changed without side effects elsewhere.

Polish before you publish. Name files so another developer can find them, keep settings labels clear for merchants, and remove unused sections and snippets. A storefront is the place where small template errors become visible to every customer, so give testing the time it needs.

Acceptance checklist for a custom Shopify theme

Use this list to accept a theme from your own team or from a partner. Each item can be checked in a review session on the development store.

CheckHow to verifyPass when
Theme CheckRun shopify theme checkNo errors; warnings explained
Online Store 2.0 structureOpen each template in the theme editorEvery template except the exempt ones is JSON and accepts sections
Merchant editingA merchandiser builds a landing page and edits a product page without helpDone without touching code
Content modelOpen two products with different metafield valuesEach shows its own specifications from data, not hard-coded text
PerformanceLighthouse on home, collection and product pages, desktop and mobile, with real contentAverages meet your agreed targets (Theme Store floor: 60 performance)
AccessibilityLighthouse plus a keyboard-only pass through browse, cart and checkout entryAverage score meets target (Theme Store floor: 90); no keyboard traps
AppsInstall and uninstall each required appApp blocks appear in the editor; uninstalling leaves no broken code
TranslationsSwitch to each store languageAll theme strings come from locale files
HandoverReview the repository and READMEAnother developer can run shopify theme dev and find each section by name

When you choose a partner for this work, ask them to walk you through this checklist on a theme they built, and to show how they keep merchant edits and code changes from overwriting each other.

Variety of Ecommerce Theme Builders

Shopify is one of the best-known ecommerce platforms, but not the only one, and the right theme approach depends on the platform you run. At Dinarys we also work with Magento and Shopware, which handle themes differently.

Magento

In Magento (Adobe Commerce and Magento Open Source), a theme is the component that gives the store a consistent look and feel. The application ships with two themes: Luma, a demonstration theme, and Blank, which is meant as the starting point for custom themes. A custom theme can inherit from a parent theme and override only the files it needs to change, which keeps upgrades manageable.

Typical reasons for a custom Magento theme include:

If this is your platform, see our Magento theme development services.

Shopware

In Shopware 6, themes customise the Storefront. Shopware's documentation explains that themes "are not a separate extension type, but are either implemented as plugins or, in Cloud environments, delivered via apps". The default theme is built on Bootstrap 5, themes can inherit from other themes and override Twig templates, and an activated theme is assigned to a sales channel in the Theme Manager. Shopware's open templates allow many adjustments in the administration, and the Storefront can also be completely individualised. See our Shopware services for more.

Cost to Develop a Custom Theme

The final price of a custom theme depends on its complexity and on your developers' rates, which vary widely by location and seniority. Rather than rely on a generic range, estimate it from your plan:

Lower rates do not automatically mean lower quality, and higher rates do not guarantee it. Compare partners on portfolio, on how they test and hand over work, and on a written scope. For an accurate figure for your project, request a custom quote; our team will prepare a dedicated offer.

Best Shopify Custom Theme Development Recipe: Conclusion

Building a Shopify theme from scratch in 2026 means Shopify CLI, the Skeleton theme, JSON templates, sections and blocks, and Liquid. The old Timber and Theme Kit route is closed. Before you start, decide honestly whether you need a custom theme at all, or a customised Online Store 2.0 theme plus an app for the feature that makes your store different.

Shopify's limits exist for a reason. Spend time understanding them, and you will usually find that working with the platform's structure gives you more freedom, not less: merchants can change pages on their own, and the code you do write stays small enough to maintain.

Dinarys works with Shopify stores, including the Undrgoods move from WooCommerce to Shopify for three regional stores and the multilingual myfelt migration from Magento to Shopify. If you are planning Shopify theme development and would rather not handle the details yourself, see our Shopify development services and Shopify website design services, or contact us with your plan and your acceptance checklist, and we will tell you which route fits.

If you already run a larger business on Magento or Shopware, the same logic applies there: a unique theme helps you stand out only when it is built on the platform's own structure and stays easy to maintain.

Let professionals meet your challenge

Our certified specialists will find the most optimal solution for your business.

Please enter valid name
Please enter valid company
Please enter a valid phone
Please enter valid E-mail
Message is too short

    Your message has been successfully sent. We will be in touch shortly! Success icon