Version: Drupal 8.7.x

Currently, I am using a subtheme of the Bootstrap theme and I want to override the default login page because the interface doesn't look good. I was hoping to override the template file in Bootstrap theme responsible for login but there was no file with familiar name in the theme folder. Maybe Bootstrap inherited the login file as well? Then I created a file named page--user--login.html.twig and put that in my subtheme folder but there was no change in the login page. Maybe the file name is supposed to be different or it is something else entirely.

  • 1
    page--user--login.html.twig should work. The file should be located in my_theme/templates/page--user--login.html.twig - and make sure you clear the cache too.
    – 100pic
    Sep 6, 2019 at 0:38
  • 1
    Yes, I was using the same file name but as Stanley pointed out, you can check the filename by setting debug: true in services.yml. In my case the file I needed to create was page--login.html.twig
    – Aves2432
    Sep 6, 2019 at 13:14

1 Answer 1


Go to


and change the debug value from false to true

debug: true

enter image description here

You will get file name suggestions like shown in the image, u should use the same names.

Also, was your sub-theme succesfully installed? Is the sub-theme under this path ? `



  • 1
    Thank you so much.Yes my theme was working but the file name was wrong. In my case it was page--login.html.twig instead of page--user-login.html.twig. I checked the source code after doing debug: true as you instructed. Then I changed to appropriate filename
    – Aves2432
    Sep 6, 2019 at 13:17

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.