If there is an error in Magento, you will see the following page:
Or if we need to update the production and we turn on maintenance mode, we have the following page:
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:
<?xml version="1.0" ?>
<skin> magedirect </skin>
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:
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:
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?