WordPress Enable Custom Error log
- Article
- Comment
It’s good sometimes to record the possible errors from our theme or plugin, instead of showing them in the browser. We can log it into a separate file and check it. Let’s get started to implement it.
First open your wp-config_db.php And find this
define(‘WP_DEBUG’, false);
And replace it with below code
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
With the above code. first we are turning the debugging mode on and ask WordPress to log into a separate log. Ofcourse we need not display the errors in the browser. So we are disabling it.
With the above code snippet. You can get work here.