custom 503 and 404 error page


How can I create custom 503 and 404 error page?

what about creating a 404 in your theme / plugin: Resources/views/storefront/page/error/error-404.html.twig ?

how to link to the new html.twig that created by yourself?

I tried to add a controller.php to my theme and configured route.xml and services.xml, but it still can’t configure it properly.

You can create it : content - shopping experience - shop Pages

Create new one “shop page”

Then go to settings - shop - basic informations



It worked fine!

In my case, just have to check my .env file for APP_ENV and change it from dev to prod in order to work error handling page!