Advertisement
urosevic

WordPress: WP_DEBUG to wp-content/debug.log

Feb 11th, 2015
386
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * This will log all errors notices and warnings to a file called debug.log in
  3.  * wp-content only when WP_DEBUG is true. if Apache does not have write permission,
  4.  * you may need to create the file first and set the appropriate permissions (i.e. use 666).
  5.  */
  6.  
  7. define( 'WP_DEBUG', true ); // Or false
  8. if ( WP_DEBUG ) {
  9.     define( 'WP_DEBUG_LOG', true );
  10.     define( 'WP_DEBUG_DISPLAY', false );
  11.     @ini_set( 'display_errors', 0 );
  12.     error_reporting(E_ALL);
  13. }
Advertisement
RAW Paste Data Copied
Advertisement