How can I customize the Login Page for Admin in Magento 2? I want to change the Logo and CSS Styles there.

  • Does you know any exp with rewrite template magento ???
    – HoangHieu
    Commented Apr 18, 2016 at 17:19
  • I'm not on my work PC at the moment so I can't provide code, but you will need to make changes to the templates/XML in the Magento_Customer module. This is the XML you will need to extend - github.com/magento/magento2/blob/develop/app/design/frontend/…. Do not edit this file, you need to extend it within your own theme. If you have any problems let me know and I'll provide some examples.
    – Ben Crook
    Commented Apr 18, 2016 at 19:04
  • To modify the default admin logo with custom theme, check here.
    – Pratik Oza
    Commented Dec 17, 2017 at 6:58

1 Answer 1


You propably have to add new theme for backend. Currently it is possible only by overwriting di.xml, so you must create new module, with sequence 'Magento_Theme'.

Then you have to create etc/adminhtml/di.xml file with following content:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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">Vendor/theme</item>

Then create new theme in app/design/adminhtml/Vendor/theme with parent set for 'Magento/backend'. In this theme you can overwrite styles or .phtml files as it was frontend theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.