Magento admin logo change!












4















I am trying to change Magento2.2.2 admin logo.

But no success.

This is what I have done:



This file app/design/adminhtml/XXX/yyy/theme.xml contains:



<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Xy_Theme</title>
<parent>Magento/backend</parent>
</theme>


This file app/design/adminhtml/XXX/yyy/registration.php contains:



<?php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'adminhtml/XXX/yyy',
__DIR__
);


This file app/design/adminhtml/XXX/yyy/Magento_Theme/layout/default.xml contains:



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>Admin Title</title>
</head>
<body>
<referenceContainer name="header">
<block class="MagentoBackendBlockPageHeader" name="logo" before="-">
<arguments>
<argument name="show_part" xsi:type="string">logo</argument>
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
<argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
<argument name="logo_alt" xsi:type="string">My Admin</argument>
</arguments>
</block>
</referenceContainer>
</body>


And finally my logo image is in
app/design/adminhtml/XXX/yyy/web/images/my-logo.svg










share|improve this question





























    4















    I am trying to change Magento2.2.2 admin logo.

    But no success.

    This is what I have done:



    This file app/design/adminhtml/XXX/yyy/theme.xml contains:



    <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Xy_Theme</title>
    <parent>Magento/backend</parent>
    </theme>


    This file app/design/adminhtml/XXX/yyy/registration.php contains:



    <?php
    MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::THEME,
    'adminhtml/XXX/yyy',
    __DIR__
    );


    This file app/design/adminhtml/XXX/yyy/Magento_Theme/layout/default.xml contains:



    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <title>Admin Title</title>
    </head>
    <body>
    <referenceContainer name="header">
    <block class="MagentoBackendBlockPageHeader" name="logo" before="-">
    <arguments>
    <argument name="show_part" xsi:type="string">logo</argument>
    <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
    <argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
    <argument name="logo_alt" xsi:type="string">My Admin</argument>
    </arguments>
    </block>
    </referenceContainer>
    </body>


    And finally my logo image is in
    app/design/adminhtml/XXX/yyy/web/images/my-logo.svg










    share|improve this question



























      4












      4








      4








      I am trying to change Magento2.2.2 admin logo.

      But no success.

      This is what I have done:



      This file app/design/adminhtml/XXX/yyy/theme.xml contains:



      <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
      <title>Xy_Theme</title>
      <parent>Magento/backend</parent>
      </theme>


      This file app/design/adminhtml/XXX/yyy/registration.php contains:



      <?php
      MagentoFrameworkComponentComponentRegistrar::register(
      MagentoFrameworkComponentComponentRegistrar::THEME,
      'adminhtml/XXX/yyy',
      __DIR__
      );


      This file app/design/adminhtml/XXX/yyy/Magento_Theme/layout/default.xml contains:



      <?xml version="1.0"?>
      <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
      <head>
      <title>Admin Title</title>
      </head>
      <body>
      <referenceContainer name="header">
      <block class="MagentoBackendBlockPageHeader" name="logo" before="-">
      <arguments>
      <argument name="show_part" xsi:type="string">logo</argument>
      <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
      <argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
      <argument name="logo_alt" xsi:type="string">My Admin</argument>
      </arguments>
      </block>
      </referenceContainer>
      </body>


      And finally my logo image is in
      app/design/adminhtml/XXX/yyy/web/images/my-logo.svg










      share|improve this question
















      I am trying to change Magento2.2.2 admin logo.

      But no success.

      This is what I have done:



      This file app/design/adminhtml/XXX/yyy/theme.xml contains:



      <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
      <title>Xy_Theme</title>
      <parent>Magento/backend</parent>
      </theme>


      This file app/design/adminhtml/XXX/yyy/registration.php contains:



      <?php
      MagentoFrameworkComponentComponentRegistrar::register(
      MagentoFrameworkComponentComponentRegistrar::THEME,
      'adminhtml/XXX/yyy',
      __DIR__
      );


      This file app/design/adminhtml/XXX/yyy/Magento_Theme/layout/default.xml contains:



      <?xml version="1.0"?>
      <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
      <head>
      <title>Admin Title</title>
      </head>
      <body>
      <referenceContainer name="header">
      <block class="MagentoBackendBlockPageHeader" name="logo" before="-">
      <arguments>
      <argument name="show_part" xsi:type="string">logo</argument>
      <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
      <argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>
      <argument name="logo_alt" xsi:type="string">My Admin</argument>
      </arguments>
      </block>
      </referenceContainer>
      </body>


      And finally my logo image is in
      app/design/adminhtml/XXX/yyy/web/images/my-logo.svg







      magento2 magento-2.1






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 14 '18 at 4:54









      Teja Bhagavan Kollepara

      2,94841847




      2,94841847










      asked Dec 16 '17 at 12:45









      AmandaAmanda

      211




      211






















          2 Answers
          2






          active

          oldest

          votes


















          3














          Try this code:





          1. app/code/[VendorName]/[ModuleName]/registration.php




          MagentoFrameworkComponentComponentRegistrar::register(
          MagentoFrameworkComponentComponentRegistrar::MODULE,
          '[VendorName]_[ModuleName]',
          __DIR__
          );




          1. app/code/[VendorName]/[ModuleName]/etc/module.xml




          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
          <module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
          <sequence>
          <module name="Magento_Theme"/>
          </sequence>
          </module>
          </config>




          1. app/code/[VendorName]/[ModuleName]/etc/di.xml




          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <type name="MagentoThemeModelViewDesign">
          <arguments>
          <argument name="themes" xsi:type="array">
          <item name="adminhtml" xsi:type="string">[VendorName]/[themename]</item>
          </argument>
          </arguments>
          </type>
          </config>




          1. app/design/adminhtml/[VendorName]/[themename]/registration.php




          MagentoFrameworkComponentComponentRegistrar::register(
          MagentoFrameworkComponentComponentRegistrar::THEME,
          'adminhtml/[VendorName]/[themename]',
          __DIR__
          );




          1. app/design/adminhtml/[VendorName]/[themename]/theme.xml




          <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
          <title>Theme Title</title>
          <parent>Magento/backend</parent>
          </theme>




          1. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml




          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <update handle="styles" />
          <body>
          <referenceBlock name="logo">
          <arguments>
          <argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
          </arguments>
          </referenceBlock>
          </body>
          </page>




          1. app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg

          2. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/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>
          <referenceContainer name="header">
          <referenceBlock name="logo">
          <arguments>
          <argument name="logo_img_width" xsi:type="number">300</argument>
          <argument name="logo_img_height" xsi:type="number">300</argument>
          <argument name="show_part" xsi:type="string">logo</argument>
          <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
          <argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
          </arguments>
          </referenceBlock>
          </referenceContainer>
          </body>
          </page>




          1. app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg

          2. Magento CLI




          php bin/magento setup:upgrade
          php bin/magento setup:di:compile


          Note:




          1. For Admin login page logo change, follow steps - 6 & 7

          2. For Admin menu
            logo change, follow steps - 8 & 9


          Note:
          Feel free to use PNG files instead of SVG for logo.



          Note:
          If changes not reflected on Admin pages then try below steps:





          1. Uninstall a manually added theme




            • mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"




          2. Upgrades the Magento application, DB data, and schema




            • php bin/magento setup:upgrade

            • php bin/magento setup:di:compile








          share|improve this answer


























          • Is it necessary to create app/code/[VendorName]/[ModuleName] ? Only creating adminhtml theme won't work ?

            – Slimshadddyyy
            Jan 3 '18 at 8:29











          • @Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.

            – Pratik Oza
            Jan 3 '18 at 11:52











          • magento.stackexchange.com/questions/207833/…

            – Slimshadddyyy
            Jan 3 '18 at 11:55



















          0














          We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007



          We simply use a helper method in order to replace the src of the logo.



          <argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">


          The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "479"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f206100%2fmagento-admin-logo-change%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            Try this code:





            1. app/code/[VendorName]/[ModuleName]/registration.php




            MagentoFrameworkComponentComponentRegistrar::register(
            MagentoFrameworkComponentComponentRegistrar::MODULE,
            '[VendorName]_[ModuleName]',
            __DIR__
            );




            1. app/code/[VendorName]/[ModuleName]/etc/module.xml




            <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
            <module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
            <sequence>
            <module name="Magento_Theme"/>
            </sequence>
            </module>
            </config>




            1. app/code/[VendorName]/[ModuleName]/etc/di.xml




            <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
            <type name="MagentoThemeModelViewDesign">
            <arguments>
            <argument name="themes" xsi:type="array">
            <item name="adminhtml" xsi:type="string">[VendorName]/[themename]</item>
            </argument>
            </arguments>
            </type>
            </config>




            1. app/design/adminhtml/[VendorName]/[themename]/registration.php




            MagentoFrameworkComponentComponentRegistrar::register(
            MagentoFrameworkComponentComponentRegistrar::THEME,
            'adminhtml/[VendorName]/[themename]',
            __DIR__
            );




            1. app/design/adminhtml/[VendorName]/[themename]/theme.xml




            <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
            <title>Theme Title</title>
            <parent>Magento/backend</parent>
            </theme>




            1. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml




            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <update handle="styles" />
            <body>
            <referenceBlock name="logo">
            <arguments>
            <argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
            </arguments>
            </referenceBlock>
            </body>
            </page>




            1. app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg

            2. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/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>
            <referenceContainer name="header">
            <referenceBlock name="logo">
            <arguments>
            <argument name="logo_img_width" xsi:type="number">300</argument>
            <argument name="logo_img_height" xsi:type="number">300</argument>
            <argument name="show_part" xsi:type="string">logo</argument>
            <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
            <argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
            </arguments>
            </referenceBlock>
            </referenceContainer>
            </body>
            </page>




            1. app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg

            2. Magento CLI




            php bin/magento setup:upgrade
            php bin/magento setup:di:compile


            Note:




            1. For Admin login page logo change, follow steps - 6 & 7

            2. For Admin menu
              logo change, follow steps - 8 & 9


            Note:
            Feel free to use PNG files instead of SVG for logo.



            Note:
            If changes not reflected on Admin pages then try below steps:





            1. Uninstall a manually added theme




              • mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"




            2. Upgrades the Magento application, DB data, and schema




              • php bin/magento setup:upgrade

              • php bin/magento setup:di:compile








            share|improve this answer


























            • Is it necessary to create app/code/[VendorName]/[ModuleName] ? Only creating adminhtml theme won't work ?

              – Slimshadddyyy
              Jan 3 '18 at 8:29











            • @Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.

              – Pratik Oza
              Jan 3 '18 at 11:52











            • magento.stackexchange.com/questions/207833/…

              – Slimshadddyyy
              Jan 3 '18 at 11:55
















            3














            Try this code:





            1. app/code/[VendorName]/[ModuleName]/registration.php




            MagentoFrameworkComponentComponentRegistrar::register(
            MagentoFrameworkComponentComponentRegistrar::MODULE,
            '[VendorName]_[ModuleName]',
            __DIR__
            );




            1. app/code/[VendorName]/[ModuleName]/etc/module.xml




            <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
            <module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
            <sequence>
            <module name="Magento_Theme"/>
            </sequence>
            </module>
            </config>




            1. app/code/[VendorName]/[ModuleName]/etc/di.xml




            <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
            <type name="MagentoThemeModelViewDesign">
            <arguments>
            <argument name="themes" xsi:type="array">
            <item name="adminhtml" xsi:type="string">[VendorName]/[themename]</item>
            </argument>
            </arguments>
            </type>
            </config>




            1. app/design/adminhtml/[VendorName]/[themename]/registration.php




            MagentoFrameworkComponentComponentRegistrar::register(
            MagentoFrameworkComponentComponentRegistrar::THEME,
            'adminhtml/[VendorName]/[themename]',
            __DIR__
            );




            1. app/design/adminhtml/[VendorName]/[themename]/theme.xml




            <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
            <title>Theme Title</title>
            <parent>Magento/backend</parent>
            </theme>




            1. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml




            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <update handle="styles" />
            <body>
            <referenceBlock name="logo">
            <arguments>
            <argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
            </arguments>
            </referenceBlock>
            </body>
            </page>




            1. app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg

            2. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/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>
            <referenceContainer name="header">
            <referenceBlock name="logo">
            <arguments>
            <argument name="logo_img_width" xsi:type="number">300</argument>
            <argument name="logo_img_height" xsi:type="number">300</argument>
            <argument name="show_part" xsi:type="string">logo</argument>
            <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
            <argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
            </arguments>
            </referenceBlock>
            </referenceContainer>
            </body>
            </page>




            1. app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg

            2. Magento CLI




            php bin/magento setup:upgrade
            php bin/magento setup:di:compile


            Note:




            1. For Admin login page logo change, follow steps - 6 & 7

            2. For Admin menu
              logo change, follow steps - 8 & 9


            Note:
            Feel free to use PNG files instead of SVG for logo.



            Note:
            If changes not reflected on Admin pages then try below steps:





            1. Uninstall a manually added theme




              • mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"




            2. Upgrades the Magento application, DB data, and schema




              • php bin/magento setup:upgrade

              • php bin/magento setup:di:compile








            share|improve this answer


























            • Is it necessary to create app/code/[VendorName]/[ModuleName] ? Only creating adminhtml theme won't work ?

              – Slimshadddyyy
              Jan 3 '18 at 8:29











            • @Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.

              – Pratik Oza
              Jan 3 '18 at 11:52











            • magento.stackexchange.com/questions/207833/…

              – Slimshadddyyy
              Jan 3 '18 at 11:55














            3












            3








            3







            Try this code:





            1. app/code/[VendorName]/[ModuleName]/registration.php




            MagentoFrameworkComponentComponentRegistrar::register(
            MagentoFrameworkComponentComponentRegistrar::MODULE,
            '[VendorName]_[ModuleName]',
            __DIR__
            );




            1. app/code/[VendorName]/[ModuleName]/etc/module.xml




            <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
            <module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
            <sequence>
            <module name="Magento_Theme"/>
            </sequence>
            </module>
            </config>




            1. app/code/[VendorName]/[ModuleName]/etc/di.xml




            <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
            <type name="MagentoThemeModelViewDesign">
            <arguments>
            <argument name="themes" xsi:type="array">
            <item name="adminhtml" xsi:type="string">[VendorName]/[themename]</item>
            </argument>
            </arguments>
            </type>
            </config>




            1. app/design/adminhtml/[VendorName]/[themename]/registration.php




            MagentoFrameworkComponentComponentRegistrar::register(
            MagentoFrameworkComponentComponentRegistrar::THEME,
            'adminhtml/[VendorName]/[themename]',
            __DIR__
            );




            1. app/design/adminhtml/[VendorName]/[themename]/theme.xml




            <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
            <title>Theme Title</title>
            <parent>Magento/backend</parent>
            </theme>




            1. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml




            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <update handle="styles" />
            <body>
            <referenceBlock name="logo">
            <arguments>
            <argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
            </arguments>
            </referenceBlock>
            </body>
            </page>




            1. app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg

            2. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/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>
            <referenceContainer name="header">
            <referenceBlock name="logo">
            <arguments>
            <argument name="logo_img_width" xsi:type="number">300</argument>
            <argument name="logo_img_height" xsi:type="number">300</argument>
            <argument name="show_part" xsi:type="string">logo</argument>
            <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
            <argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
            </arguments>
            </referenceBlock>
            </referenceContainer>
            </body>
            </page>




            1. app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg

            2. Magento CLI




            php bin/magento setup:upgrade
            php bin/magento setup:di:compile


            Note:




            1. For Admin login page logo change, follow steps - 6 & 7

            2. For Admin menu
              logo change, follow steps - 8 & 9


            Note:
            Feel free to use PNG files instead of SVG for logo.



            Note:
            If changes not reflected on Admin pages then try below steps:





            1. Uninstall a manually added theme




              • mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"




            2. Upgrades the Magento application, DB data, and schema




              • php bin/magento setup:upgrade

              • php bin/magento setup:di:compile








            share|improve this answer















            Try this code:





            1. app/code/[VendorName]/[ModuleName]/registration.php




            MagentoFrameworkComponentComponentRegistrar::register(
            MagentoFrameworkComponentComponentRegistrar::MODULE,
            '[VendorName]_[ModuleName]',
            __DIR__
            );




            1. app/code/[VendorName]/[ModuleName]/etc/module.xml




            <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
            <module name="[VendorName]_[ModuleName]" setup_version="1.0.0">
            <sequence>
            <module name="Magento_Theme"/>
            </sequence>
            </module>
            </config>




            1. app/code/[VendorName]/[ModuleName]/etc/di.xml




            <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
            <type name="MagentoThemeModelViewDesign">
            <arguments>
            <argument name="themes" xsi:type="array">
            <item name="adminhtml" xsi:type="string">[VendorName]/[themename]</item>
            </argument>
            </arguments>
            </type>
            </config>




            1. app/design/adminhtml/[VendorName]/[themename]/registration.php




            MagentoFrameworkComponentComponentRegistrar::register(
            MagentoFrameworkComponentComponentRegistrar::THEME,
            'adminhtml/[VendorName]/[themename]',
            __DIR__
            );




            1. app/design/adminhtml/[VendorName]/[themename]/theme.xml




            <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
            <title>Theme Title</title>
            <parent>Magento/backend</parent>
            </theme>




            1. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/layout/admin_login.xml




            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <update handle="styles" />
            <body>
            <referenceBlock name="logo">
            <arguments>
            <argument name="logo_image_src" xsi:type="string">images/login-logo.svg</argument>
            </arguments>
            </referenceBlock>
            </body>
            </page>




            1. app/design/adminhtml/[VendorName]/[themename]/web/images/login-logo.svg

            2. app/design/adminhtml/[VendorName]/[themename]/Magento_Backend/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>
            <referenceContainer name="header">
            <referenceBlock name="logo">
            <arguments>
            <argument name="logo_img_width" xsi:type="number">300</argument>
            <argument name="logo_img_height" xsi:type="number">300</argument>
            <argument name="show_part" xsi:type="string">logo</argument>
            <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
            <argument name="logo_image_src" xsi:type="string">images/menu-logo.svg</argument>
            </arguments>
            </referenceBlock>
            </referenceContainer>
            </body>
            </page>




            1. app/design/adminhtml/[VendorName]/[themename]/web/images/menu-logo.svg

            2. Magento CLI




            php bin/magento setup:upgrade
            php bin/magento setup:di:compile


            Note:




            1. For Admin login page logo change, follow steps - 6 & 7

            2. For Admin menu
              logo change, follow steps - 8 & 9


            Note:
            Feel free to use PNG files instead of SVG for logo.



            Note:
            If changes not reflected on Admin pages then try below steps:





            1. Uninstall a manually added theme




              • mysql -u <user> -p -e "delete from <dbname>.theme where theme_path ='<VendorName>/<themename>' AND area ='adminhtml' limit 1"




            2. Upgrades the Magento application, DB data, and schema




              • php bin/magento setup:upgrade

              • php bin/magento setup:di:compile









            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 17 '17 at 6:32

























            answered Dec 17 '17 at 5:59









            Pratik OzaPratik Oza

            1,966411




            1,966411













            • Is it necessary to create app/code/[VendorName]/[ModuleName] ? Only creating adminhtml theme won't work ?

              – Slimshadddyyy
              Jan 3 '18 at 8:29











            • @Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.

              – Pratik Oza
              Jan 3 '18 at 11:52











            • magento.stackexchange.com/questions/207833/…

              – Slimshadddyyy
              Jan 3 '18 at 11:55



















            • Is it necessary to create app/code/[VendorName]/[ModuleName] ? Only creating adminhtml theme won't work ?

              – Slimshadddyyy
              Jan 3 '18 at 8:29











            • @Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.

              – Pratik Oza
              Jan 3 '18 at 11:52











            • magento.stackexchange.com/questions/207833/…

              – Slimshadddyyy
              Jan 3 '18 at 11:55

















            Is it necessary to create app/code/[VendorName]/[ModuleName] ? Only creating adminhtml theme won't work ?

            – Slimshadddyyy
            Jan 3 '18 at 8:29





            Is it necessary to create app/code/[VendorName]/[ModuleName] ? Only creating adminhtml theme won't work ?

            – Slimshadddyyy
            Jan 3 '18 at 8:29













            @Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.

            – Pratik Oza
            Jan 3 '18 at 11:52





            @Vikram - To create admin theme, first you need to register it. For more detail, check links: Create an Admin theme & Apply an Admin theme.

            – Pratik Oza
            Jan 3 '18 at 11:52













            magento.stackexchange.com/questions/207833/…

            – Slimshadddyyy
            Jan 3 '18 at 11:55





            magento.stackexchange.com/questions/207833/…

            – Slimshadddyyy
            Jan 3 '18 at 11:55













            0














            We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007



            We simply use a helper method in order to replace the src of the logo.



            <argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">


            The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml






            share|improve this answer




























              0














              We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007



              We simply use a helper method in order to replace the src of the logo.



              <argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">


              The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml






              share|improve this answer


























                0












                0








                0







                We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007



                We simply use a helper method in order to replace the src of the logo.



                <argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">


                The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml






                share|improve this answer













                We have implemented a solution which does exactly the same. It allows you to replace the logo on the admin login page as well as on top of the admin navigation without creating a new theme. Beside that you can put a text ( e.g Implemented by Your Company ) below the Sign In button. Check out https://shop.magenizr.com/?module=1007



                We simply use a helper method in order to replace the src of the logo.



                <argument name="logo_image_src" xsi:type="helper" helper="VendorModuleHelperData::getAdminLogoSrc">


                The above argument must be placed in VendorModuleviewadminhtmllayoutadmin_login.xml







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 10 mins ago









                MagenizrMagenizr

                112




                112






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f206100%2fmagento-admin-logo-change%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Magento 2 controller redirect on button click in phtml file

                    Polycentropodidae