打開 WordPress 配置文件 wp-config.php,將WP_DEBUG這一行修改為如下代碼即可:
// 開啟WP_DEBUG模式 下面的true改為false可以關掉調試模式
define( 'WP_DEBUG', true );
// 開啟DEBUG日志,一定要記得關閉這個日志功能並清理這個日志文件哦,產生的日志文件在: /wp-content/debug.log
define( 'WP_DEBUG_LOG', true );
// 顯示errors and warnings
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'display_errors', 'On' );