WordPress critical error page is a nightmare for most of the WordPress Developers. If you accidentally upload a file with a bug, suddenly all your visitors will face this white message of death. Generally text displayed here has no meaning for your visitor.

There has been a critical error on your website. Please check your site admin email inbox for instructions. Learn more about debugging in WordPress.

But, WordPress allows you to customize this default error page using a drop-in file. If you want to change your critical error page to a more descriptive page (or maybe add some branding to it) just follow the steps below.

Note. Steps provided below require basic HTML + CSS and FTP knowledge. Please consult a developer if you have no clue about them 😉


Change WordPress Critical Error Page Content/Style

  1. Create a php file named “php-error.php” in your wp-content folder.
  2. Add following code:
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1">
  <title>Holy 500t</title>
<style>
body *{font-family: Arial, Helvetica Neue, sans-serif; font-size:18px;text-align:center;padding:10px;margin:10px auto;max-width:728px;}body{background:#444;color:#eee}h1{font-size:32px}
</style>
</head>
<body>
  <section>
    <h1>500: Out of Cafeine Error</h1>
    <p>Please add more coffee into your code!</p>
  </section>
  <footer>WP Assist</footer>
</body>
</html>

3. Edit the code as needed.


PS. I don’t recommend adding any links back to your site, as it is already having issues. So, just keep it simple.

Now when you have a critical error on one of your theme files, your visitors will see the content of this page instead of wordpress critical error message.

We hope you find this tip useful! Check out our WP Tips category for more posts like this.

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *