How to override twig templates I'm having a bit of a hard time with Drupal 8.

I've created a custom theme and am trying to override twig files. I've got debugging enabled so I know which files to copy to my template directory. However, when I copy a twig template it outputs nothing.

For example, I'm trying to wrap the site title in an H1 element. The core template file used in this case is /core/themes/stable/templates/block/block--system-branding-block.html.twig. If I add the H1 element in that file the header is inside a H1 element, but when I copy the twig file to my template directory the whole header is gone.

I can see in the source code that the file was found:

&lt;!--  BEGIN OUTPUT from 'themes/mytheme/block--system-branding-block.html.twig' --&gt;
&lt;!--  END OUTPUT from 'themes/mytheme/block--system-branding-block.html.twig' --&gt;


The documentation suggests that copying the relevant twig file is all that's needed but maybe I'm missing something? And if this should work, how can I debug this issue (the Apache error log doesn't report any errors).
Yes, to override twig file you just need to have the twig file with filename suggestion you get with debugger.

In case you are not able to see it, make sure of following:-


Your custom theme is enabled.
Folder where you kept your twig file has right permission.
Clear your Drupal caches.