Both PHP errors and database errors can manifest as a white screen, a blank screen with no information, commonly known in the WordPress community as the WordPress White Screen of Death. [The White Screen of Death]
WordPress users, at many times, encounter some errors called white screen of death. This error shows a white completely black-white screen. To figure out what the problem is can take a lot of time but we are about to tell to some quick ways to restore your website. The mentioned fixes can contain some coding or use of plugins as well.
Fix White Screen of Death Errors with Coding
For troubleshooting purposes, wp-config is your friend in need. To enable the debugging mode, you will have to add some lines of code. Debugging mode displays all the errors on your website in a list. For sites on local access just add the following code to your wp-config file:
define( 'WP_DEBUG', true );
And place it above this line in your wp-config file:
/* That's all, stop editing! Happy blogging. */
If WP-DEBUG is already written in the wp-config file, then set it to “true” excluding the quotation marks.
For live websites, try not to use this code as it will display all the errors as well as root server file path and other important information on the homepage which can put a bad impression on the visitors and also put your website under threat. Use the following code for debugging a live site:
// Enable WP_DEBUG modedefine('WP_DEBUG', true); // Enable Debug logging to the /wp-content/debug.log file define('WP_DEBUG_LOG', true); // Disable display of errors and warnings define('WP_DEBUG_DISPLAY', false); @ini_set('display_errors',0); // Use dev versions of core JS and CSS files (only needed if you are modifying these core files) define('SCRIPT_DEBUG', true);
Fix White Screen of Death Errors with WP Plugins
Plugins can also help you out solving errors on your site, and there are many plugins made for this specific purpose. For example there are some trusted and regularly updated plugins like ‘ WordPress Debug plugin’, ‘WP Debug Bar Plugin’ which enables the debugging mode on your with within a single click while for multisite WordPress installs the plugin ‘Debug This’ provides you a lot of functionalities for troubleshooting of errors on your WordPress site.
For cPanel, you could check the errors through the ‘error log’ button in the logs section while for Plesk, go to the files tab and select error_log under the logs section.
Here is the list of WordPress Plugins to debug your site.
WordPress Debugging Plugins
Debugged! is the premier debugging suite for WordPress theme and plugin developers (although everyone is certainly welcome to it!). It provides a simple to use and unobtrusive debugging bar (the location and display of which is configurable) which will allow you to check system information, GET and POST variables, cookies, session variables and SQL queries at a glance, as well as providing a simple-to-use error checker and inline W3C validation.
WordPress FirePHP Debugger is a WordPress (mu-)plugin used to improve quality and comfort of development under WordPress. This plugin can replace a bunch of plugins for WordPress developers and increase speed and efficiency of the development process.
3. Debug Bar
It adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
It adds a PHP/MySQL console to the debug bar. Requires the debug bar plugin.
This plugin logs the usage of deprecated files, functions, and function arguments. It identifies where the deprecated functionality is being used and offers the alternative if available. This plugin also logs incorrect function usage, which WordPress started reporting in 3.1.
WP-Lens is the ultimate plugin for WordPress security analysis and discovery about your theme and installation. WP-Lens combines a variety of checks and mechanisms to give you a clear picture of your current state of security and installation. It also allows you to have access to what is going on behind the scenes of every page. It also requires zero configuration outside of installing the plugin.
The Total Security plugin is the must-have tool when it comes security of your WordPress installation. The plugin monitors your website for the security weaknesses that hackers might exploit and tells you how to fix them easily.
A WordPress plugin for monitoring database queries, hooks, conditionals, HTTP requests, query vars, environment, redirects including automatic AJAX debugging and more.
9. WP Error Fix
WP Error Fix tracks all types of errors on your WordPress website by giving the complete report in an easy-to-read format.
This Plugin is a simple and slim PHP to Console bridge to deliver debugging messages. It supports Strings, Arrays, and Objects. The setup is minimal: since we are in the WordPress Framework, it’s as simple as activating a Plugin.
These white screen errors may frustrate you if you don’t troubleshoot what the cause of this problem was and also there are some traditional techniques which could also be used to resolve this as well as other issues. For instance,
1- change your theme to the default twenty-seventeen. If this works, then it means there’s some problem with your theme.
2- Disable all the plugins, if there’s a plugin conflict then you will certainly find out the faulty plugin.
3- Clear your site’s cache.
4- the bandwidth of your web hosting package could have reached its limit.
There were some of the most common ways to check your WordPress site but apart from these if you know any other debugging techniques, do share with us!