How to Install Hyvä with Composer, Step by Step

From a free Packagist key to an activated theme: every Composer and Magento command you need, in the right order.

How to Install Hyvä with Composer, Step by Step – illustration

Composer is the supported way to install Hyvä on a Magento 2 store. It installs the theme together with its required modules and turns later updates into a single command. This guide walks through the full process, from creating an account to checking the storefront after activation.

The steps assume shell access to a Magento 2.4 installation that meets the system requirements, and basic familiarity with the command line.

Work on a development or staging copy first, with a recent database backup. Switching themes on a live store without testing will expose any extension that is not yet compatible.

Before you begin

Confirm three things before running any command:

  • Magento version. Run bin/magento --version. You need 2.4.4-p9, 2.4.5-p8, 2.4.6-p7, 2.4.7-p1 or a later release.
  • PHP version. Run php -v. Hyvä supports PHP 8.1 to 8.4.
  • Composer version. Run composer --version and make sure it reports version 2.

It also helps to put the store into developer mode on your staging copy, so that errors are displayed clearly while you work.

Step 1: Create a Hyvä account

Register at hyva.io. After confirming your email address you will be taken to the Hyvä Portal, where licence keys, Composer credentials and installation notes are kept together.

Step 2: Request a free theme key

In the portal, open the licences area and choose the option to get a free Hyvä Theme licence key. Enter the domain of your store and confirm.

Individual accounts can create up to five free keys, which covers most projects. Registered agency partners can create more. One key can be used for the development, staging and production copies of the same store.

Step 3: Add the private repository

Under your licences, open the Composer credentials for the new key. The portal shows a token and a project name. Add both to Composer from your Magento root directory:

composer config --auth http-basic.hyva-themes.repo.packagist.com token YOUR_TOKEN
composer config repositories.private-packagist composer https://hyva-themes.repo.packagist.com/YOUR_PROJECT_NAME/

The first command stores the token in auth.json. Treat that file like a password: never commit it to a public repository. In CI pipelines, supply the token through an environment variable instead.

Step 4: Require the theme

composer require hyva-themes/magento2-default-theme

Composer resolves the theme module, base layout reset, email module and other dependencies automatically. The download is small, and the command usually completes in under a minute.

If Composer reports a conflict, read the message carefully. It is most often caused by an outdated Magento patch level or by an extension that pins an old dependency.

Hyvä manages its own assets, so Magento's built-in merging, bundling and minification should be switched off. Leaving them on can break Alpine.js components or add needless work to each request. Magento's legacy image captcha is also not supported; use Google reCAPTCHA instead.

bin/magento config:set dev/template/minify_html 0
bin/magento config:set dev/js/merge_files 0
bin/magento config:set dev/js/enable_js_bundling 0
bin/magento config:set dev/js/minify_files 0
bin/magento config:set dev/js/move_script_to_bottom 0
bin/magento config:set dev/css/merge_css_files 0
bin/magento config:set dev/css/minify_files 0
bin/magento config:set customer/captcha/enable 0

Step 6: Run the Magento commands

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

In developer mode, the compile and static deployment steps can be skipped, because Magento generates those files on demand. In production mode they are required.

Step 7: Activate the theme

In the Magento admin, go to Content > Design > Configuration. Edit the row for your store view, select hyva/default in the Applied Theme field and save. Flush the cache once more and open the storefront in a private browser window.

For multi-store installations, repeat the selection for each store view that should use Hyvä. Store views can keep Luma while others move, which is useful for a phased roll-out.

Step 8: Check the result

Work through the main customer journeys on desktop and mobile:

  1. Home page, navigation menu and search.
  2. A category page with filters and sorting.
  3. A simple and a configurable product page.
  4. Add to cart, mini cart and cart page.
  5. Customer login, registration and account pages.
  6. Checkout, through to a test order.

An unstyled or broken block almost always points to an extension that still needs a Hyvä compatibility module. Note each one and consult the compatibility guide.

Optional modules

  • hyva-themes/magento2-luma-checkout keeps the standard Luma checkout working while the rest of the store uses Hyvä.
  • hyva-themes/magento2-cms-tailwind-jit compiles Tailwind classes typed into CMS pages and blocks in the admin.
composer require hyva-themes/magento2-luma-checkout
composer require hyva-themes/magento2-cms-tailwind-jit

Installing from GitHub instead

Since the theme became open source, its repositories are also public on GitHub. You can register each one as a Composer git repository rather than using a Packagist key. This works, but you must add every dependency yourself, so the Packagist route is simpler for most teams.

The ZIP archive offered on this site is useful for reading the templates and Tailwind setup offline. It is not intended for installing Hyvä on a live store, because it does not include the supporting modules.

Common installation problems

SymptomLikely causeFix
Composer returns 401 or 403Wrong or missing tokenRe-run the auth command with the token from the portal
Storefront has no stylingStatic files not deployedRun static content deploy and flush the cache
Menus or mini cart do nothingJavaScript bundling still enabledApply the settings in Step 5
One block looks brokenIncompatible extensionInstall its Hyvä compatibility module

Installing in a CI/CD pipeline

For teams that deploy through a pipeline, the same steps apply, split between build and release. The build stage runs composer install with the Hyvä token supplied as a secret, compiles the Tailwind stylesheet with Node.js, runs setup:di:compile and deploys static content. The release stage then switches the new code into place and runs setup:upgrade only when the database schema has changed.

Supplying the token as an environment variable keeps it out of version control:

composer config --global --auth http-basic.hyva-themes.repo.packagist.com token "$HYVA_TOKEN"

Updating Hyvä later

Hyvä releases arrive regularly, with bug fixes, accessibility improvements and occasional new features. A safe update routine looks like this:

  1. Read the upgrade notes for every version between yours and the target.
  2. Run composer update hyva-themes/* --with-dependencies on a development copy.
  3. Compare any templates your child theme overrides with the new parent versions.
  4. Rebuild the Tailwind stylesheet and run setup:upgrade.
  5. Retest the main customer journeys before deploying.

Hyvä also publishes upgrade helper tools that automate parts of larger moves, such as migrating a theme from Tailwind CSS v3 to v4.

Rolling back if needed

Because Hyvä installs alongside Luma, rolling back is simple: select the previous theme for the affected store views under Content > Design > Configuration and flush the cache. The Hyvä packages can stay installed until you are ready to try again, or be removed with composer remove.

Production deployment checklist

  • Store is in production mode, with compiled code and deployed static files.
  • Tailwind stylesheet built with npm run build, not the watch command.
  • Full-page cache enabled and warmed for key pages.
  • Magento's JavaScript and CSS bundling settings remain disabled.
  • Error monitoring in place to catch any template issues quickly after launch.

Conclusion

Installing Hyvä is quick: add your free key, run composer require hyva-themes/magento2-default-theme, disable Magento's asset bundling, run the setup commands and select hyva/default in the admin. The real work begins afterwards, testing each journey and resolving extensions. Once that is done, a child theme is the right place for your own design.

Frequently Asked Questions

Not strictly. A free Packagist key is the simplest route, but the repositories are also public on GitHub and can be added to Composer directly.

Not realistically. Composer and the Magento command line both need shell access. Most managed Magento hosts provide it.

No. Hyvä installs alongside Luma. Nothing changes on the storefront until you select hyva/default for a store view.

Run composer update hyva-themes/* followed by setup:upgrade, then rebuild your Tailwind stylesheet and flush the cache.

Sources and Further Reading

Hyvä Editorial Team
Hyvä Editorial Team

We write practical guides on the Hyvä theme for Magento 2, checked against the official documentation and public repositories. How we research