Today, we’re going to teach you guys how to install a theme via composer in Magento 2.
As most of you might already know that a theme helps to provide a consistent look and feel to a website or eCommerce store.
So, it’s crucial to install a theme that helps to provide an interactive & better shopping experience.
And in this post, we’re going to show you guys exactly how to install a new theme in your Magento 2 via Composer.
Step-by-Step Process to Install a Theme in Magento 2 Via Composer
In order to install a new theme in your Magento 2 store, first, you need to get a new theme. Now, there are hundreds of Magento 2 themes available for free in the market.
But, if you’re serious about improving the customer experience, we highly recommend purchasing premium Magento 2 themes to ensure a best-in-class shopping experience for your customers.
Once you’ve purchased a theme, you need to follow the below steps carefully to properly install the theme in your Magento 2 store.
Step - 1
Unzip the downloaded theme file into your system and find the composer name of the theme.
Step - 2
After that, navigate to the root directory of your Magento 2 store and execute the following command:
composer require <vendor>/<name>:<version>;
Now, wait until all the dependencies are updated.
Step - 3
Next, execute the following command to install the new theme in your Magento 2 store via Composer.
git add -A && git commit -m "Add theme" git push origin <branch name>
Step - 4
Now, verify that the theme is successfully installed and registered.
Login to your admin panel and navigate to Content > Design > Themes.
Then, check if the new theme is displayed in the list of available themes in the right panel.
Also read: How to Add a Custom Widget to a Magento 2 Theme?
Conclusion
And that’s it! That’s how easy it is to install a new theme in Magento 2 via Composer.
We hope that you found this tutorial helpful. If you have any queries, please ask them in the comments below.
And if you’re looking for premium Magento 2 themes in the market, we have the best collection for every industry.