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 the following code:
  <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">
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}
    <h1>500: Out of Cafeine Error</h1>
    <p>Please add more coffee into your code!</p>
  <footer>WP Assist</footer>

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, 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.