How to Install a Theme in Magento 2
A theme in Magento 2 provides a consistent look and feel in the store frontend or the admin area, with the help of custom templates, layouts, styles or images. Nowadays, people tend to judge a book by its cover and thus, a beautiful design and theme play an important role in site recognition. The Magento 2 themes are well known to provide better customer experience and interactive platform! Hence they are a must-have in your store infrastructure.
Before diving into the method to install a theme in Magento 2, take a look at the advantages of themes and how to choose the perfect one for your E-commerce business! A banner is displayed in the frontend is not designed keeping in mind any custom theme designs. The solution to this issue is to override extension file in theme in Magento 2.
Advantages of a theme in Magento 2:
- The responsiveness characteristic makes it possible to offer the same environment to every user, regardless of the operative platform.
- The responsive themes provide a scalable platform, i.e., adding new features and functions to already built theme is easier.
- Improved security features with the Magento 2 themes.
- The responsiveness nature is appreciated by Google and other search engines, giving you the SEO benefit!
- Improved user experience, of course!
- Easy installation process (We’ll see here how easy it is to install a theme in Magento 2!)
- The free Magento themes are compatible with the new versions of Magento and are optimized for all important web browsers.
- Absolute uniqueness for your Magento 2 store with custom themes.
Points to keep in mind while choosing the Magento 2 Theme:
- A well-built store with elegant visual effect can work wonders. While an ugly theme can increase the bounce rate. Hence, focussing on the appearance, select a professional looking theme that represents your business.
- A robust theme with advantages of SASS, Bootstrap 3, HTML5, and CSS3 makes your store responsive.
- User friendliness themes with easy navigations, useful buttons, and neat arrangements are essential for your theme.
- It MUST be fast-loading and SEO friendly, for e.g. Hyvä Themes.
- Select the theme suitable for your business model.
- Select a theme that is compatible with multiple browsers to reach more audiences.
- A good color blend with your products and services!
- With the advanced use of social media, a social media friendly theme is appreciated.
Proceeding to the steps to install a theme in Magento 2, check the below method:
Methods to Install a Theme in Magento 2:
-
Install Manually
When you have a list of files in a zipped folder as a new theme, follow this method.
- Unzip the theme
Unzip the archive of the theme and spot the two directories: app and pub. - Upload the files
- Navigate to the root directory of your Magento 2 store
- Upload the folders into the root directory.
- Run the commands
- Connect the store via SSH.
- Navigate to the root directory
- Upgrade the setup with these commands:
12php bin/magento setup:upgradephp bin/magento setup:static-content:deployThank You.
- Login to Admin panel
- Unzip the theme
-
Install via Composer
When you have a theme as a composer package, follow this method.
- Purchase a theme from Magento Marketplace.
- Achieve the Composer name of the theme;
- Navigate to the root directory and enter the below command:
1composer require <vendor>/<name>:<version>; - Wait till dependencies are updated;
- Run the below commands:
1git add -A && git commit -m "Add theme" git push origin <branch name>To verify that the theme is registered, follow the below steps:
- Login to Admin Panel and reload any of the backend pages after the theme is installed.
- Navigate to Content>Design>Themes
- Check if the theme is displayed on the right panel in the list of available themes.
The success of an E-commerce store is achieved by many things and a theme is one of the prominent element. Hopefully, the above tutorial has helped you enough to install a theme in Magento 2! If not, feel free to post your doubts in comments section below and I’d be happy to solve
Thank You.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
4 Comments
it was great post I get know about magento and thinking to make ecommerce website in it
Hey, thank you for your appreciation! I’m grateful to help you with my post. Best wishes on your website.
Thank you!
Hello!
My question is – when I do not have a magento 2 root directory downloaded on my computer, then what I do for step 2?
(manually)
Best regards
Anette
Hello Anette,
You just paste theme file in localhost magento2 as per the theme guide
Thanks.