Fix block template part has been deleted or is unavailable

If you find your header and/or footer is missing on some page types using new block themes, you might get this error message :

Template part has been deleted or is unavailable: header

and this where your footer used to be :

Template part has been deleted or is unavailable: footer

I your WordPress Dashboard, go to Tools > Theme File Editor > Theme Files and click on index.html.

Once the index.html file loads in the file editor, click Update File and your header and footer should be restored.

If not, load a product category page, click edit site and click reset in the Template settings and that should restore your header and footer on pages it’s gone missing which may be your category archive pages or other page types.

I tested by solutions and they both worked using the latest default block theme for WordPress, Twenty Twenty Four.