Costumize error page

Hi everyone!
I would like to costumize the error page but I can’t manage to do that.
I added a file called error.php in the template folder and added some text but when I get an error I see the this page:
Screen Shot 2022-06-28 at 10.44.27 AM

Is there anything else I need to do to make it work?

Have you enabled debug in your config to see what error you get?

I guess you want to overwrite the 404 error page?

Oh I see - so this screen is when I have a bug in my code,
and error is like 404? it will lead automatically to error.php page?

Exactly, you get the above when you have an error in your code, and debugging is not enabled. This is so that the cause of the error is not given away in production.

Whereas the error.php template will show a message to your visitors if a page doesn’t exist.

Note that the above fatal view can also be configured: fatal | Kirby CMS

But it’s two different things.

1 Like

I understand now!
Thank you so much for your help :slight_smile: