Trying to debug my development and running into a lot of frustrations with lack of output in the debug.log. For example, I have this defined in wp-config.php:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
ini_set( 'display_errors', 0 );

I have this in my functions.php

add_filter( 'the_content', 'my_custom_function' );
function my_custom_function( $content ){
  error_log( 'this fired' ); //never works!
  $return $content;

What am I missing?

  • Do you have a debug.log file at all? Please check the /wp-content/ directory.
    – JHoffmann
    Dec 18, 2016 at 1:29
  • Yes I see deprecated/notice errors and can clear them and see them come right back, just can't manually debug my own work. Dec 18, 2016 at 2:47
  • Disabled speed of light caching plugin and now I am seeing my debugs, whew. Dec 18, 2016 at 2:58

1 Answer 1


After disabling all plugins I was able to narrow down which one was affecting the log output. The client had installed Speed of Light plugin to provide caching and compression which was also effecting wp_debug capabilities.

  • 1
    Feel free to accept your own answer.
    – Flimm
    Nov 8, 2018 at 10:39

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.