How to override login.phtml template in Magento 2?

You can override login.phtml file using layout XML way or directly add template file to the theme level under Magento_Customer theme module.

login.phtml file used to display login form in Frontend area.

Theme Level Override,

app/design/frontend/<ThemePackage>/themename/Magento_Customer/templates/form/login.phtml

Module Level Override,

You can see a base definition for define login.phtml file at customer module, Magento_Customer/view/frontend/layout/customer_account_login.xml location.

Leave a Reply