Custom error page

Last updated on
24 February 2023

By default, if some unexpected error happens, Drupal will show a page with the text "The website encountered an unexpected error. Please try again later". This is not very user-friendly and it is not elegant.

The mix module comes with some configurations to help you replace the default error page with custom messages or a well-designed HTML page.

Mix module - Custom error page

Configurations

  • Visit the /admin/config/mix page
  • Find and check the "Enable custom error page" checkbox.
  • (Optional) Click "View current error page" to see the error page.
  • Change the content of the "Error page content" field with your custom messages or HTML code (or just leave it untouched to use an error page like the one in the right part of the above screenshot) 
  • Click the "Save configuration" button.
  • (Optional) Click "View current error page" to see the error page.

Help improve this page

Page status: No known problems

You can: