Add the following to wp-config.php:
define( "WP_DEBUG", true );
define( "WP_DEBUG_LOG", true );
define( "WP_DEBUG_DISPLAY", false );
After that, errors will be written to /wp-content/debug.log.
Important: don’t leave WP_DEBUG enabled on a live site — it may expose sensitive information.
Was this helpful?