urosevic icon

WordPress: WP_DEBUG to wp-content/debug.log

urosevic | PRO | 02/11/15 07:50:11 AM UTC | 0 ⭐ | 735 👁️ | Never ⏰ | []
PHP |

460 B

|

None

|

0 👍

/

0 👎

/**
 * This will log all errors notices and warnings to a file called debug.log in
 * wp-content only when WP_DEBUG is true. if Apache does not have write permission,
 * you may need to create the file first and set the appropriate permissions (i.e. use 666).
 */
 
define( 'WP_DEBUG', true ); // Or false
if ( WP_DEBUG ) {
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );
    error_reporting(E_ALL);
}

Comments