How to Install Hyvä Theme in Magento 2
Performance and speed are the lifeblood of any modern eCommerce store. Over the past few years, the Hyvä Theme has completely revolutionized the Magento 2 ecosystem by replacing the heavy, outdated Luma stack (RequireJS, Knockout, jQuery) with a lightweight, blazing-fast combination of Alpine.js and Tailwind CSS.
If you are new to this frontend revolution, we highly recommend reading our deep dive into [Hyvä Theme Architecture in Magento 2: Components, Structure & How It Works] to understand the underlying mechanics. Once you are familiar with the architecture, you are ready to get your hands dirty.
In this comprehensive tutorial, we will show you exactly how to install Hyvä Theme in Magento 2, from configuring composer credentials to activating it in your admin panel.
Prerequisites for Installing Hyvä
Unlike free open-source themes, Hyvä is a commercial product. Before starting the installation process, ensure you have the following ready:
- A Valid Hyvä License: You must purchase a license to get access to their private GitLab repository and Packagist.
- Magento 2 Instance: A working Magento 2 installation (version 2.4.0 or higher is heavily recommended).
- Composer: Installed and configured on your server or local environment.
- Node.js & npm: Required later if you plan to compile Tailwind CSS for your custom child theme.
Steps To Install Hyvä Theme in Magento 2
Step 1: Configure Composer Authentication
Since Hyvä’s packages are hosted in a private repository, you need to authenticate your Composer with your Hyvä GitLab credentials.
Open your terminal, navigate to your Magento 2 root directory, and run the following command to add the Hyvä Packagist repository:
composer config repositories.hyva-themes/magento2-theme-fallback git [email protected]:hyva-themes/magento2-theme-fallback.git
composer config repositories.hyva-themes/magento2-theme-module git [email protected]:hyva-themes/magento2-theme-module.git
composer config repositories.hyva-themes/magento2-default-theme git [email protected]:hyva-themes/magento2-default-theme.git
(Note: Alternatively, you can use the Hyvä Private Packagist URL provided in your license dashboard for a cleaner setup without managing SSH keys).
Step 2: Require the Hyvä Packages
With the repositories configured, you can now download the core Hyvä modules and the default theme files into your project.
Run this composer command:
composer require hyva-themes/magento2-default-theme
Composer will prompt you for a username and password. Enter your Hyvä Private Packagist token (or GitLab credentials) here. The installation will fetch the fallback theme, the core module, and the frontend theme files.
Step 3: Run Magento Setup Commands
Once the files are downloaded, you need to register the new modules and theme within your Magento system. Execute the standard Magento deployment commands:
# Enable the Hyvä modules
php bin/magento module:enable Hyva_Theme
# Upgrade the database schema
php bin/magento setup:upgrade
# Compile dependency injection (DI)
php bin/magento setup:di:compile
# Deploy static content (replace en_US with your locale if needed)
php bin/magento setup:static-content:deploy -f
# Flush the cache
php bin/magento cache:flush
Step 4: Activate the Theme in the Admin Panel
The theme is now installed on your server, but you still need to tell Magento to use it for your storefront.
- Log in to your Magento 2 Admin Panel.
- Navigate to Content > Design > Configuration.
- Find the store view or website you want to apply the theme to and click Edit.
- Under the Applied Theme dropdown, select Hyvä Default.
- Click Save Configuration at the top right.
After saving, flush your Magento cache one more time from the admin panel or via the CLI:
php bin/magento cache:flush
Step 5: Verify the Installation
Open a new incognito window and visit your Magento storefront. You should immediately notice a drastically cleaner, faster, and more responsive UI powered by Tailwind CSS. Open your browser’s developer tools (F12) and check the network tab—you will see that the massive RequireJS and Knockout files are completely gone!
Conclusion
Congratulations! You now know how to install Hyvä Theme in Magento 2. By making this switch, you have laid a solid foundation for achieving a perfect 100/100 Core Web Vitals score.
The next step is to create a custom child theme based on this default installation, where you can start customizing Tailwind classes and Alpine components to match your brand’s unique design.
Have you encountered any composer permission issues during the setup? Let us know in the comments below, and we will help you troubleshoot!