Fix white page or blank screen issues on your wordpress site using wp_debug or debug.log via wp-config.php

Are you having issues with your wordpress site loading a white page, and nothing else. Then I would recommend checking the debug.log file to see what is occurring as it could be a simple php error.

Here is a video demonstrating this process. https://youtu.be/8OF-U2QIEhM

First open your wp-config.php file with a text editor, and add the define lines here into the bottom of the file.


vim /home/user/public_html/wp-config.php

define( ‘WP_DEBUG’, true );
define(‘WP_DEBUG_LOG’, true);
define( ‘WP_DEBUG_DISPLAY’, false);

Make sure you either replace, or comment out define( ‘WP_DEBUG’, false );

Once you have this wp-config.php file saved you may have to create the accompanying debug.log file, and change the ownership on the file to your user. On the SSH bash syntax below replace ‘user’ with your actual username

touch /home/user/public_html/wp-content/debug.log
chown user. /home/user/public_html/wp-content/debug.log

Now we can watch the debug.log file as we load the site to see what is occurring when we attempt to load the site.

tail -f /home/user/public_html/wp-content/debug.log

[23-Mar-2019 18:15:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_error() in /home/plangisbetter/public_html/wp-content/plugins/revslider/inc_php/framework/db.class.php:29

In this case its a PHP fatal error due to undefined mysql_error() function with the revslider plugin. This function was removed in PHP 7.0 and newer, which we found with a quick google search. There are two solutions. Update the plugin to a newer version that supports php 7.0, and newer. Or change the php version of the site to php 5.5. I would recommend updating the plugin as PHP 5.5 no longer receives security updates.

If this helped you out consider subscribing on youtube, or following me on https://twitch.tv/djrunkie

Leave a Reply

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