How to customize error page

If there is an error in Magento, you will see the following page:

error processing

Or if we need to update the production and we turn on maintenance mode, we have the following page:

turn on maintenance


Not so attractive, right?
However, we can change the display of these pages by creating a new theme for errors. Let our theme be called magedirect.
In the pub/errors folder, we create a new local.xml file with the following content:

In the pub/errors folder, we create a new magedirect folder. For simplicity, just copy the contents of the pub/errors/default folder to our magedirect folder. It turns out the following structure:

error page customization

For modifications to the maintenance page, we can simply edit the HTML file in the file 503.phtml. Styles can be written in the css/styles.css folder.
For example, we have made the following maintenance page:


maintenance page

In the same way, you can edit the report.phtml or 404.phtml file to change the look of the error page or 404 pages respectively.

Nothing difficult, right?

Was this article helpful?
Dislike 0
Views: 80
Ihor Klymchuk
Rate us
Please wait...