Building a custom Magento theme on Luma or Blank starts with the parent theme choice
A merchant or platform lead who needs a branded storefront on Magento Open Source should decide early whether to extend Luma or Blank as the parent theme, because that choice sets which templates, styles and layout files the custom theme inherits and which it must carry itself. Luma is the sample storefront that ships with the product and already contains a full design. Blank is a minimal parent with few visual decisions made, so a custom theme built on it starts from less styling and usually needs more upfront design work. Either way, the custom theme is a separate component that declares its parent, so the decision is made in the theme's own declaration rather than in the core code.
In Magento's component model, a theme is one of three component types Adobe's developer documentation names for extending Magento Open Source, alongside modules and language packages. Modules follow a PSR-4 compliant structure, so their namespaces map directly to folder paths, while a theme is a directory of templates, layouts, styles and assets that the storefront resolves at runtime. The theme lives in the codebase under the app/design directory, with a registration file and a composer package definition, which lets a team version it in the same repository as its modules and deploy it through the same pipeline.
A custom theme is justified when the design, layout or frontend behavior cannot be reached through the admin's design configuration, which covers logos, colors, fonts and content blocks, and through Page Builder content. Before committing to a theme build, the team should confirm in writing which storefront changes the business needs, list the templates each change touches, and check whether an existing extension already supplies the behavior. Ask the agency or partner to show how the parent choice affects that list, because a theme that overrides many inherited templates carries more upgrade effort at each patch cycle than one that changes only a few.
Luma or Blank: which parent theme fits which store
This table compares Luma and Blank as parent themes for a custom storefront across brand distance, inherited coverage, extension assumptions, build effort and team skills. Read each row as a question to answer for your store, then confirm the inheritance and asset behavior against the source of the Magento version you will install.
| Factor | Luma | Blank |
|---|---|---|
| Brand distance from default look | Suits stores that keep most of the default layout and styling and change colors, fonts and selected blocks | Suits stores with a distinct design system that would otherwise override most of Luma's styling |
| Inherited template and layout coverage | Broad coverage of catalog, checkout and account templates, so fewer overrides are needed for a near-default look | Minimal styling and fewer visual templates, so the team must write or override more layouts and blocks itself |
| Extension compatibility assumptions | Most extensions were built against Luma's markup and RequireJS or Knockout components, so they usually need less adaptation | Extensions that expect Luma's markup or assets may render incorrectly, so each extension needs a compatibility check |
| Front-end build and maintenance effort | Lower initial build effort for a light customization, but overrides of Luma templates must be re-checked at each patch | Higher initial build effort for a custom look, but fewer inherited Luma overrides to track after upgrades |
| Team skills required | Front-end developers familiar with Magento's template, layout XML and LESS theming | Front-end developers comfortable building the full styling and template set, including the asset pipeline |
| Best fit | Stores that want a fast launch with a customized brand and limited design departure | Stores with a bespoke design, a planned long-term front end, or a need to control every template |
| Confirm before choosing | Which Luma templates and styles your extensions and custom modules override, using the installed version's source | Which base templates, layout handles and assets Blank provides in the exact version you install, using its source |
How to set up a custom theme from Luma or Blank step by step
This sequence takes a team from a confirmed Magento Open Source release to a custom storefront theme that is registered, inherits cleanly from its parent, deploys static assets and is verified on staging before it reaches customers.
Confirm the release and stack combination
Before any theme code is written, the platform lead confirms the Magento Open Source release line and checks the exact PHP, MySQL or MariaDB, OpenSearch, Redis or Valkey, RabbitMQ, Composer and nginx versions against Adobe's system requirements for that release. Adobe supports only the listed combinations, so a mismatch found here is far cheaper than one found during static deployment. Output: a written version matrix signed off by the engineering lead, with the Varnish version noted for self-managed installations. Check: every component in the staging environment matches a supported row in the matrix.
Choose Luma or Blank as the parent theme
The front-end lead decides which parent the custom theme extends. Luma is the default storefront theme with a full set of templates, styles and layouts, so a brand-led design that keeps most of Luma's page structure inherits more out of the box. Blank is a minimal parent with fewer assumptions, which suits a design that will override most templates. Ask the agency or internal team to document which page types, widgets and checkout steps they expect to inherit, since that list drives the override plan in later steps. Check: a one-page decision record names the parent and the inherited page types.
Register the theme with theme.xml and registration.php
The developer creates the theme folder under app/design/frontend, with a vendor and theme name, then adds registration.php to register the theme with the framework and theme.xml to declare its title and parent. The parent is set in theme.xml so that Magento resolves any template or layout file the custom theme does not define from Luma or Blank. Output: a theme that appears in the admin theme list after setup:upgrade. Check: the theme is listed under Content > Design > Configuration, and the parent value shown matches the decision record.
Plan overrides in layout XML and templates
Overrides are planned before anything is copied. Layout XML changes are preferred where a block needs to move, be removed or get a new argument, because they stay small and survive parent updates better than copied templates. Copied .phtml templates are reserved for markup the design must change. Each override is logged with its source file in the parent, the reason, and the owner, so an upgrade review can see what diverges. Check: the override register lists every copied template and layout file, and no file is copied without an entry.
Build styles and set up static content deployment
The front-end developer adds the theme's styles and assets, then runs static content deployment for the locales and themes in use. Asset builds are run from the same release artifact used in other environments, so the output is not hand-edited on a server. The build must complete without missing-file or LESS compilation errors. Check: the static deploy finishes cleanly for every locale and the theme's CSS and JavaScript load in the browser without 404 responses.
Run developer mode checks
With developer mode enabled on a non-production environment, the developer loads each page type the design touches and watches the logs and browser console for template path errors, missing layout handles and JavaScript errors. Developer mode exposes template hints and file paths that show whether a page is using the custom theme's file or the parent's. Remove any debugging changes before the build is promoted. Check: a page-type checklist is completed with no unresolved errors, and the template hints confirm the expected file for each override in the register.
Assign the theme per store view on staging
On the staging store, the theme is assigned to the intended scope under Content > Design > Configuration, one store view at a time, so that a multi-store setup does not switch all storefronts at once. The team confirms the assignment in each store view, then clears and rebuilds caches. Output: a staging store where each store view resolves to the expected theme. Check: the design configuration grid shows the right theme per store view and the rendered header, footer and product page match the approved designs in each view.
Verify the theme on staging before release
The final gate runs on a staging copy that mirrors production configuration, including the content security policy, caching layer and indexers. The team tests the core journeys (category, product, cart, checkout and account pages) in each store view, then checks that a later static deployment and the override register still agree. Any finding returns to the register before go-live. Output: a signed test record with the theme version, parent version and override list attached. Check: the test record shows zero open blocking defects and the register matches the deployed files.
What to override and what to inherit from the parent theme
The working rule for a custom Magento theme is to inherit layouts, templates and styles from the parent unless the brand or a specific feature forces a change. Every override is a file you must carry forward through each patch and minor upgrade, so the question for each template is whether the parent already does the job with a layout XML change, a CSS variable or a small block override. Start by listing the brand requirements that cannot be met that way, such as header structure, product card markup or checkout step layout, and treat everything else as inherited. Prefer layout XML updates that move, remove or add blocks, and copy only the individual template file that must change rather than an entire directory.
Magento resolves a template or layout file by looking through the theme inheritance chain, starting with the active child theme and falling back to the parent (Luma or Blank) and then to the module defaults. A file present in the child theme wins, so a copied template fully replaces the parent version, including any bug fixes or markup Adobe changes in later releases. That is why copying large Luma templates multiplies upgrade work: each copied file becomes a private fork that must be diffed against the new parent on every patch, and a change in one shared template can break several customized pages at once. Keep a register of every overridden file with the reason for the override, so the upgrade team can check each one against the release notes before the parent changes underneath it.
Adobe's upgrade guide names customizations, extension count, third-party integrations and coding practices as the main drivers of upgrade effort, and it recommends upgrading every patch cycle to stay secure and PCI compliant. Theme overrides sit squarely in the customizations category, so the number and size of copied templates is one of the first figures to ask a partner to measure during planning. Ask the delivery team to run the Upgrade Compatibility Tool against the current theme, record which overrides it flags, and estimate the rework per patch cycle. Confirm with your team which parent (Luma or Blank) your brand will sit on for the next several years, because switching parents later means re-auditing every override.
How to keep the theme upgrade-safe across patch cycles
A custom theme stays upgradeable only if its differences from the parent theme stay small, traceable and tested. The practices below connect how the theme is built to the patch cycles Adobe recommends, so each change can be checked before it reaches production.
Keep overrides minimal and documented
Override only the templates, layouts and styles you must change, and record why each override exists, which parent file it replaces and who owns it. Every unexplained override is a file that a patch can silently break. In a Luma child theme, prefer layout XML and CSS variables over copying whole templates. Review the override list at each patch and delete anything no longer needed.
Track copied files against parent versions
When you copy a template or LESS file from Luma or Blank, note the parent version it came from. When Adobe ships a patch that changes that file, you will know exactly which copies need a manual merge. Without this record, teams often discover a changed checkout or product template only after a storefront regression. Keep the mapping in version control next to the theme code.
Run the Upgrade Compatibility Tool before each patch
Adobe's Upgrade Compatibility Tool scans custom code for issues that affect an upgrade, so run it against the theme and custom modules before applying each patch. Treat its output as a starting list, not a clean bill of health, because it does not test how your templates render. Compare results with the previous run to spot new findings introduced by your own changes.
Automate visual regression on key templates
Capture screenshots of the home page, category listing, product detail, cart, checkout and account pages at desktop and mobile widths, then compare them after each patch. This catches CSS and layout drift that code scans miss, such as a changed spacing rule that pushes the add-to-cart button below the fold. Agree the list of pages and the tolerance for differences with the merchandising and UX owners before the first baseline is captured.
Pin front-end build tooling
Lock the Node.js version, the npm packages used for LESS and JavaScript compilation, and the Grunt or related build steps in the theme's lock files. Unpinned build tools can change the compiled CSS or JavaScript even when the Magento code is untouched, which makes a regression hard to trace. Upgrade the toolchain as a separate, tested change, so a patch and a build tool update never land together.
Schedule patch cycles in advance
Adobe recommends upgrading every patch cycle to stay secure and PCI compliant. Put the patch window on the release calendar before the release date, assign an owner for the theme compatibility check and reserve time for regression testing and rollback. Teams that wait for a security incident to apply a patch usually compress testing into a few hours. Confirm the current release dates on Adobe's release schedule before you set the calendar.
How a custom theme inherits from Luma or Blank
The diagram starts at the custom theme, which declares a parent theme in its registration and composer metadata. Requests for a template or static asset resolve through the theme inheritance chain: the local theme first, then the parent Luma or Blank files underneath. Local overrides in the custom theme replace only the files they define, so everything else keeps flowing from the parent. Before go-live, check that the static content deployment step has run for each locale and theme, and confirm which store views are assigned to the theme.
Inheritance from the parent theme, local overrides and deployment to store views.
Security and operational considerations for a custom storefront theme
A custom theme changes what the browser loads, how pages are cached and what must be retested after each patch. The cards below cover the controls that connect those areas, so the theme team and the security team review the same decisions before launch.
Content Security Policy headers
Magento Open Source supports Content Security Policy headers from 2.3.5, and from 2.4.7 CSP runs in restrict mode by default on storefront and admin payment pages. A theme that adds scripts or styles without matching policy entries can break checkout or payment widgets after an upgrade. Check each template's external origins against the policy before go-live and again whenever the release line changes.
CSP documentationInline scripts in theme templates
Inline script blocks and inline event handlers written into .phtml templates are the most common way a theme weakens the policy. They also make it harder to tell which code runs on payment pages. Move behavior into module or theme JavaScript files, and list any unavoidable inline code in the security review so the team can see every exception.
Third-party tags added by the theme
Analytics, chat, tag manager and A/B testing snippets often reach the storefront through template edits rather than through a reviewed module. Each one adds a script origin, a data flow and a cookie consent question. Keep a written inventory of every tag, who approved it and which page types load it, and confirm that payment pages exclude tags the payment provider does not require.
Subresource Integrity and asset handling
Subresource Integrity lets the browser check that a file loaded from a CDN has not changed, and it applies to theme assets served from another origin. Decide which assets are self-hosted, which come from a CDN, and where hashes are generated during static content deployment. Confirm the hash update happens in the build pipeline, so a changed library never ships with a stale value.
Varnish and cache invalidation
For self-managed installations, Adobe documents Varnish as the full-page cache accelerator, while cloud-hosted Adobe Commerce uses Fastly. Template changes can serve stale markup until the relevant cache entries are flushed or invalidated. Add a cache flush and a test of cached pages to each theme deployment, and check that personalized blocks are not cached for every visitor.
Varnish cache guideVerification on each patch release
Adobe recommends upgrading every patch cycle to stay secure and PCI compliant. Each patch can change core templates, JavaScript and CSP behavior that a custom theme depends on. Keep a regression suite for checkout, login, search and product pages, run it on a staging copy with the same PHP, database and cache versions as production, and record the result before the patch goes live.
Upgrade guideQuestions buyers ask before building a custom Magento theme
How much effort does a custom Luma-based theme take, and what drives it?
Effort depends mainly on how far the design departs from Luma's stock templates. A theme that restyles colors, fonts and spacing through configuration and a child theme is small. A theme that rewrites category, product and checkout templates, adds new Page Builder content types or changes the header and navigation structure is large. Other drivers include the number of store views, the number of extensions that ship their own frontend templates, and how much custom JavaScript the design needs. Ask any partner to split the quote by template group so you can see which parts the design actually changes.
Is Blank or Luma cheaper to maintain over time?
Blank is the lighter starting point because it ships with minimal styling, so a custom theme built on it overrides less of the default look and keeps fewer inherited rules to reconcile. Luma is a complete reference design, so a Luma child theme inherits more styles and templates, and each Magento upgrade can touch more of them. Maintenance cost, though, follows what you override, not the parent name. A Luma child that changes only a few styles can be cheaper to keep than a Blank theme that rewrites most templates. Compare the override list for each option against your design before deciding.
What does the work need from our team, such as design assets and extension lists?
The build needs your side to supply a few inputs early. These are the approved design files or style guide, the list of target page types and breakpoints, the full extension inventory with each extension's version and whether it ships frontend templates, and the list of third-party scripts such as analytics, consent and chat tools. The team should also name a product owner who can approve design decisions quickly, and provide a staging environment that matches production. Missing extension details are a common cause of rework, because each one can add templates or JavaScript that the theme must account for.
Can one internal developer build a custom theme alone?
A single developer who knows Magento's theme structure, Layout XML, the template hierarchy and LESS can build a small child theme. The work becomes harder with a large design scope, several store views, Page Builder content, or extensions that need frontend changes. Plan for review of the theme by someone who has upgraded a Magento store before, since upgrade-safe structure is easy to miss. Check whether your developer can run Magento's coding and compatibility tools and whether anyone else on the team can take over the theme later. Key person risk is often the larger concern than the build itself.
How long does a custom theme take to build?
Duration depends on scope: the number of page types, the amount of design change, the extensions involved and how quickly design decisions are approved. No fixed duration applies to every store. Ask for a timeline in the written scope, with milestones for design sign-off, template build, extension testing, accessibility and performance checks, and launch. Ask the partner to state which assumptions the timeline depends on, such as how many rounds of design review are included and who supplies the extension list.
How do Magento upgrades change the cost of a custom theme over time?
Each Magento patch or minor release can change core templates, layout handles, LESS variables or JavaScript that your theme depends on. Adobe's upgrade guide names customizations, extension count, third-party integrations and coding practices as drivers of upgrade effort, and recommends upgrading every patch cycle to stay secure and PCI compliant. The cost of a custom theme therefore recurs: each cycle requires regression testing of the storefront and a review of overridden files. Keeping overrides few and documented, and running the Upgrade Compatibility Tool before each upgrade, lowers that recurring effort. Ask any quote to separate the build cost from an upgrade and support allowance.
Which file changes make a theme hard to upgrade?
The riskiest changes are full copies of core templates, edits to core files, and overrides that repeat large parts of Luma's layout. Each copied template must be merged by hand when Adobe changes the original. Safer approaches use a child theme, targeted template overrides, and Layout XML changes that move or hide blocks rather than replacing them. Record every override in a list with its reason and the original file it replaces. Ask engineers to confirm that custom JavaScript uses supported initialization patterns and does not depend on internal markup that may change.
How DeployOpen scopes and delivers a custom Magento theme
DeployOpen plans, customizes and hardens self-hosted Magento Open Source inside your own infrastructure, so the theme is built, tested and deployed in the cloud accounts, data centers or private networks you control. Theme work starts from a written scope that names the parent theme (Luma or Blank), the pages and components to be restyled, the templates and layout files to be overridden, the extensions that render on the storefront, the browsers and devices to support, and the acceptance tests that close each deliverable. Timelines are agreed in the same document, and changes after signature go through a written change request so cost and schedule stay visible to your team.
The build follows upgrade-safe practices from the first commit. Custom code lives in a module with a PSR-4 structure, and the theme declares its parent in theme.xml and overrides only the templates and layout handles it must change, so Magento's inheritance keeps supplying everything else. Overrides are logged in a register that lists each file, the reason and the upstream version it was copied from. Before each Magento patch or minor upgrade, the team runs the Upgrade Compatibility Tool and a regression pass on the overridden templates. Your team should confirm which Adobe Commerce upgrade drivers apply to its own store, including its extension count and third-party integrations, because those set the effort of every later upgrade.
At handover, DeployOpen delivers the theme repository, a build and deployment runbook, the override register, a test plan with results, and a short guide for your developers on adding components without breaking inheritance. Retainers can cover ongoing patch application, upgrade testing against each Adobe release and continuous regression checks, and their scope and response times are written into the agreement. Ask any partner, including DeployOpen, to show how its handover documents and retainer deliverables map to your own release process before signing.

