How to create an Custom Admin theme in Magento 2

  • August 8, 2021
No Comments

Magento 2 admin theme allows the admin to have a customized backend panel with custom logo, font, responsive design which makes it easier for the admin to administer!

1.) Create theme directory

In the app/design/adminhtml directory create a new Vendor/theme directory.


Inside theme directory create theme.xml file

<?xml version="1.0" ?>
<theme xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>M2e admin </title> <!-- your theme's name -->
<parent>Magento/backend</parent> <!-- the parent theme-->

2.) Create registration.php inside theme directory


use \Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::THEME, 'adminhtml/M2e/dev', __DIR__);

Now we have to Apply admin theme

3.) Create custom module to apply your admin theme



use Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'M2e_Dev', __DIR__);


<?xml version="1.0" ?>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="M2e_Dev"/>
<module name="Magento_Theme"/>

iii) M2e/Dev/etc/di.xml

<?xml version="1.0" ?>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Theme\Model\View\Design">
<argument name="themes" xsi:type="array">
<item name="adminhtml" xsi:type="string">M2e/dev</item>

final step install the module

php bin/magento setup:upgrade

php bin/magento setup:di:compile

One can create a custom admin theme in Magento 2 and include features like search tool, neat and clean panel arrangement, translation ready, custom colors, and much more!

Any doubts about the custom admin theme?

If so, feel free to mention them in the Comments section below.

I’d be happy to help.

we are expert in creating custom Theme in Magento 2 so feel free to contact us 

About us and this blog

We are a digital magento 2  development agency with a focus on helping our customers achieve great results across several key areas.

More From Our Blogs

See all posts

Leave a Comment