5

I am running Wordpress on a WAMP stack and I'm trying to debug a WSOD error, which I think is a PHP error, as I have tried disabling all my plugins and themes and they don't seem to be the problem.

I've got this in my wp-config :

 define('WP_DEBUG', true);
 if (WP_DEBUG) {
      define('WP_DEBUG_LOG', true);
      define('WP_DEBUG_DISPLAY', true);
      @ini_set('display_errors', 0);
 }

which I found online. When I reload the page I don't get any error messages, and when I check for wp-content/debug.log it doesn't exist. I can't find any error logs anywhere else either. How can I find out what is going wrong?

Thanks for any help.

4
  • Is it only one certain URL causing the white screen of death? Or all urls? I would start by putting a simple echo statement in wp-config.php and see if that shows up when you reload the page. If it doesn't that means the error is happening before WordPress loads. Anything in the PHP error logs? Apache logs? – kingkool68 Mar 11 '16 at 15:04
  • try renaming your wp-content/plugins folder to something else, this will let you quickly determine if it is being cause by a plugin and if so you can narrow it down from there. – majick Mar 11 '16 at 15:07
  • @kingkool68 - thanks for the suggestion - the echo message does appear, but that's all. majick - I already tried that which is why I said above that it wasn't a plugin issue. – Alistair67 Mar 11 '16 at 16:28
  • Update - while waiting for answers I discovered that I had to change the password to my database and at one point there was a mismatch between the password in wp-config and the database password. When I tried to reload with it in this state I did get error messages relating to the fact that it couldn't connect. Does this mean that my error reporting is working and I'm not getting the WSOD as a result of a PHP error, do you think? – Alistair67 Mar 11 '16 at 16:38
0

Make things simpler by using this in wp-config.php:

define( 'WP_DEBUG', true );             /** debug on */
define( 'WP_DEBUG_LOG', true );         /** log enabled */
define( 'WP_DEBUG_DISPLAY', true);      /** display enabled */

The @ini_set('display_errors', 0); may be breaking the WP_DEBUG error display and logging by calling the native PHP error reporting at the same time.

1
  • 2
    Thanks Mark, for your reply. I tried this simplified version, but still no error messages or error log. – Alistair67 Mar 11 '16 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.