Final Updated on January 21, 2022

This spread-out post will draw how to install Magento 2 theme in the simplest style.

For a Magento 2 e-commerce shop to run in a total-fledged way, the store should be fully-optimized at both frontend and backend level. Through the expertise of proficient Magento developers, you can optimize the backend of the store without much of a hitch. However, what about the frontend function?

The get-go and the foremost step in optimizing the frontend part as well as user-experience of your Magento two e-commerce shop is installing a regaling and user-friendly theme on your eastward-commerce store.

The more user-friendly and soothing your theme is, the ameliorate will be the users' acquisition rate and ultimately, expeditious business growth.

The principal question pops up here is, how to install Magento two theme in your prevailing Magento two e-commerce store? Apart from the Magento 2 theme installation, another concern is how to select a convenient and lightweight theme that grabs users' attention?

We've chalked out like shooting fish in a barrel to follow steps that will help you to install Magento 2 theme without any fuss. Moreover, we are going to country 2 methods for installing in Magento 2 shop. Let'due south become started.

Method 1 – How to Install a New Theme in Magento 2

  • 1. Download The Theme
  • 2. Upload The Theme
  • 3. Run Commands
  • 4. Implement the New Theme

#Download a New Theme

In that location are a plethora of websites prevailing on the Net from where you lot can purchase your coveted Magento 2 theme.The theme volition be downloaded in a Zip folder. You have to unzip files later. After unzipping files, yous volition get two directories: pub and app.

#Upload The New Theme

For uploading the theme to your Magento ii server, y'all can use any SFTP client, Filezilla, or WinScp. Brand certain to upload pub and app files to the root directory of your Magento two store.

#Run Commands

To install your coveted Magento two theme, you need to connect your shop server via SSH and upgrade the setup by running the command given below.

New Theme installation in Magento 2

Command for upgrading the setup

php bin/magento setup:upgrade

Command for deploying the Static Content

php bin/magento setup:static-content:deploy

#Implement the New Theme

Admission the admin panel of your Magento 2 store and follow the navigation Content—–Configuration

Click on the edit push button besides the Theme name section and select your theme which yous take uploaded earlier. Refresh the home page of your Magento 2 shop to see the newly uploaded theme.

We are done with method ane for installing Magento two theme. It's time to hop on to method number 2.

Method two by Emizentech – How to Create a New Theme in Magento 2

In this method, we are going to take different approach for satiating your query "How to install Magento 2 theme."

Our method two for Magento 2 theme installation is a 3 stride process.

  • one. Disable Enshroud
  • 2. Enable Developer Mode
  • 3. Create Magento 2 theme

#Disable Cache

First, connect your Magento ii server to SSH then run the given below command in root directory.

php bin/magento cache:disable

#Enable Developer Mode

Run the command given below in your Magento ii store directory to enable the developer way.

php bin/magento deploy:manner:set developer

# Create Magento2 Theme

Once you have disable cache and enable the developer mode, it's high time to create Magento 2 customized theme.

Yous tin created Magento two customized themes into

app/design/frontend/<Vendor>/<ThemeDir>

Make sure each Magento 2 theme has its own dissever directory as mentioned below.

app/design/frontend/<Vendor>/
├──<theme1>
├──<theme2>/
├──<theme3>
├--...

Create Theme Directory Structure

Create the like theme structure stated below for your preferred Magento 2 theme.


├──<theme1>/
├── theme.xml
├── composer.json
├── registration.php
├── etc/
├── i18n/
├── media/
├── web/
│ ├── css/
│ │ ├── source/
│ ├── fonts/
│ ├── images/
│ ├── js/
├──<Vendor>_<Module>/
│ ├── web/
│ │ ├── css/
│ │ │ ├── source/
│ ├── layout/
│ │ ├── override/
│ ├── templates/

In the higher up Magento ii theme structure –

<Vendor> – Name of vendor you feed

<theme1> – Name of your preferred theme

/theme.xml – theme declaration file

/registration.php –But needed to register your theme in the system

/etc/view.xml – Needed when your theme exists in the parent theme

/media – Required

Apart from knowing and implementing the Magento ii theme structure, you should also the format of numerous theme structure elements.

Formant for theme declaration – theme.xml


<theme xmlns:xsi="http://world wide web.w3.org/2001/XMLSchema-instance" :noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>EmizenTech Morden Theme</title>
<parent>Magento/luma</parent>
<media>
<preview_image>media/preview.jpg</preview_image>
</media>
</theme>

Format for registration.php File


<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/EmizenTech/mod',
__DIR__
);

Declare your logo

By default, Magento ii uses logo.svg which is defined into your selected theme'due south directory. Yous tin can declare your logo into layout configuration.


app/design/frontend/EmizenTech/modern/Magento_Theme/layout/default.xml


<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock proper noun="logo">
<arguments>
<argument name="logo_file" xsi:type="string">images/emizen_logo.jpg</argument>
<argument proper name="logo_img_width" xsi:type="number">150</argument>
<argument name="logo_img_height" xsi:type="number">150</argument>
</arguments>
</referenceBlock>
<body>
</folio>

Afterwards declaring the logo, login to Magento ii admin panel and navigate to Content :: Design :: Themes

Install new theme Magento 2

In the above epitome, you can run across your created theme. Now, edit store view to select the new theme.

Magento 2 theme configuration

Conclusion

In that location area plethora of factors involved in the gargantuan success of an e-commerce store. Nevertheless, a responsive and enticing theme is the nearly meaning one.

To install Magento 2 themeon your Magento e-commerce shop, you lot should hire experienced Magento ii developers who tin make the process of Magento 2 theme installation hassle-gratis and glitch free.