Back

Reducing plugin errors on WordPress Hosting

21 September 2018

Tim Nash

We recently began testing a new feature on our WordPress Hosting Platform to eliminate the infamous white screen of death (WSOD) for most use cases. The WSOD is normally caused by a PHP fatal error, triggered for a variety of reasons but most often it’s when files are missing or something is being called that does not exist. Fatal errors are particularly annoying as they can affect both the front end and wp-admin area meaning they cannot be fixed without lower level access via SSH or SFTP.

For users, this can be complicated and results in them approaching us for help. For their site visitors, it will mean the site appears to be down. Even once logged in, it isn’t immediately apparent how to fix the issue; navigating to the php-error.log file and looking at the last error is the usual way to check. Often, error messages can be almost indecipherable and all people want to do is get their site back up.

Our white screen of death protection detects if a PHP fatal error is occurring and (initially) identifies if that is because of a plugin.  If so, the system deactivates the plugin and notifies admin users on next login that an error has occurred.

What if you don’t want this feature?

It’s important to remember that this feature will only deactivate a plugin which is causing a fatal error that will be resulting in your site being offline. If, however, you do not want this to be enabled you can turn it off by adding the following to your my-config.php

define('TFSP_FULLY_LOADED', true);

which prevents the system from deactivating plugins if they generate fatal errors.

The shutdown handler code is inspired and adapted from code by Alain Schlesser who is the WordPress 4.9.9 lead and is hoping to add similar functionality to WordPress in the future. Our solution should not interfere with that proposed solution and if it comes to fruition then we will remove our solution in favour of it.

WSOD protection is rolling out to clients and should be enabled on your container within the next few days so hopefully you can say goodbye to the White Screen of Death for good! As always, if you have any issues our support team are here to help.