yan-k
5/21/2017 - 10:19 AM

WP Debugging Insert this into wp-config.php to enable a more diversified debugging of WordPress

WP Debugging

Insert this into wp-config.php to enable a more diversified debugging of WordPress

<?php

define( 'WP_DEBUG', false );
define( 'WP_DEVELOPMENT_MODE', false );

if ( WP_DEBUG ) {
    define ('JETPACK_DEV_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'SCRIPT_DEBUG', true );

    if ( defined( 'DOING_AJAX' ) && DOING_AJAX || defined( 'DOING_CRON' ) && DOING_CRON ) {
        define( 'WP_DEBUG_DISPLAY', false );
        @ini_set( 'display_errors', 0 );
    } else {
        if( WP_DEVELOPMENT_MODE ) {
            define( 'WP_DEBUG_DISPLAY', true );
            @ini_set( 'display_errors', 1 );
        } else {
            define( 'WP_DEBUG_DISPLAY', false );
            @ini_set( 'display_errors', 0 );
        }
    }
} else {
    define ('JETPACK_DEV_DEBUG', false );
    @ini_set( 'display_errors', 0 );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'WP_DEBUG_LOG', false );
    define( 'SCRIPT_DEBUG', false );
}