Snippet: Log errors to a file

Add following snippet to “wp-config.php”


define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);


This will log all errors notices and warnings to a file called debug.log in wp-content (if Apache does not have write permission, you may need to create the file first and set the appropriate permissions (666) )

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>