{"id":984,"date":"2020-05-05T06:19:13","date_gmt":"2020-05-05T06:19:13","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/05\/05\/create-admin-theme-in-magento-2\/"},"modified":"2025-05-22T13:16:45","modified_gmt":"2025-05-22T07:46:45","slug":"create-admin-theme-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/create-admin-theme-in-magento-2\/","title":{"rendered":"How to Create an Admin Theme in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Themes in Magento 2 are responsible for an attractive layout in the online store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly, one can&nbsp;<em><strong>create an admin theme in Magento 2<\/strong><\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A custom 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!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to create an admin theme in Magento 2:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: <\/strong>Set the Magento into developer mode. Refer&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/magento-2-modes\/\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 modes: Default, Developer, Production<\/a>for the steps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: <\/strong>Create a theme directory<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the app\/design\/adminhtml directory create a new [Namespace]\/[theme] directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: <\/strong>Add a declaration theme.xml<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>&nbsp;Add theme.xml containing at least the theme name and the parent theme name in the theme directory. It is a good practice to inherit from the default Magento Admin theme: Magento\/backend<\/li>\n\n\n\n<li>Add or copy from an existing&nbsp;<em><strong>theme.xml<\/strong><\/em>&nbsp;to your theme directory app\/design\/adminhtml\/[Namespace]\/[themename]<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;theme xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Config\/etc\/theme.xsd\">\n    &lt;title>Admin Custom Theme for Magento 2&lt;\/title> &lt;!-- your Custom theme's name -->\n    &lt;parent>Magento\/backend&lt;\/parent> &lt;!-- it must be parent theme. Example: Magento\/backend -->\n&lt;\/theme><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4: <\/strong>Create&nbsp;<em><strong>rregistration.php<\/strong><\/em>&nbsp;in app\\design\\adminhtml\\[Namespace]\\[themename] and add following code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\nuse \\Magento\\Framework\\Component\\ComponentRegistrar;\nComponentRegistrar::register(ComponentRegistrar::THEME, 'adminhtml\/[Namespace]\/[themename]', __DIR__); \/\/ Example: 'adminhtml\/Magento\/backend'<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 5: <\/strong>Create&nbsp;<em><strong>admin_login.xml<\/strong><\/em>&nbsp;in app\\design\\adminhtml\\[Namespace]\\[themename]\\Magento_Backend\\layout and add following code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;page xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" layout=\"admin-login\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd\">\n    &lt;body>\n        &lt;referenceBlock name=\"logo\">\n            &lt;arguments>\n                &lt;argument name=\"logo_image_src\" xsi:type=\"string\">images\/magento-icon.svg&lt;\/argument>\n            &lt;\/arguments>\n        &lt;\/referenceBlock>\n    &lt;\/body>\n&lt;\/page><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 6: <\/strong>Add&nbsp;<em><strong>magento-icon.svg<\/strong><\/em>&nbsp;in app\\design\\adminhtml\\[Namespace]\\[themename]\\web\\images folder<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can refer the method to&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/apply-admin-theme-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">apply an admin theme in Magento 2<\/a>&nbsp;once you have created your custom theme! Also you will need to&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/create-admin-menu-in-magento-2\/\">create Magento 2 admin menu<\/a>&nbsp;to access any custom page from the admin panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do share the post with the Magento community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Also Read:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/meetanshi.com\/blog\/change-the-admin-startup-page-in-magento-2\/\">How to Change the Admin Startup Page in Magento 2<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/meetanshi.com\/blog\/create-custom-magento-2-theme\/\">Create a Custom Theme in Magento 2?<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Themes in Magento 2 are responsible for an attractive layout in the online store. Similarly, one can&nbsp;create an admin theme in Magento 2. A custom&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-984","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/984","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=984"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/984\/revisions"}],"predecessor-version":[{"id":14931,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/984\/revisions\/14931"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}