0

I am working on a theme live on the net. I am not getting errors on my site anymore. I don't know what has happened. The page just ends where the error should be. I just put a function into the page.php file which does not exist yet and there should be an error. I have tried many things. I don't see an error log either.

define('WP_DEBUG', true);
if (WP_DEBUG) {
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', true);
    @ini_set('display_errors', 0);
}
2
  • I think display_errors should be set to 1. Please try that. If that does not suffice, then you probably need to get in touch with hosting service provider. The error log file location differs based on different hosting service. I hope this helps. Aug 14, 2015 at 5:37
  • Make sure that you are defining the WP_DEBUG constant in proper place. It should be defined in the wp-config.php file, not anywhere else. Aug 14, 2015 at 5:38

1 Answer 1

1

First of all, you have ini_set('display_errors', 0); in there, so you tell PHP that it should NOT display any errors.

And there can be another reason... error_reporting can be set in such way, that no errors are reported.

So this might help:

define('WP_DEBUG', true);
if (WP_DEBUG) {
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', true);
    ini_set('display_errors', 1);
    ini_set('display_startup_errors',1);
    ini_set('error_reporting', E_ALL);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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