define('WP_DEBUG', true); not show errors

后端 未结 4 1904
后悔当初
后悔当初 2021-01-01 22:29

I enabled the errors in my wp-config file:

define(\'WP_DEBUG\', true);

But this not work, Wordpress continues showing me a white screen, a

4条回答
  •  一个人的身影
    2021-01-01 23:20

    The below code, inserted in your wp-config.php file, will log all errors, notices, and warnings to a file called debug.log in the wp-content directory. It will also hide the errors so they do not interrupt page generation.

    this code you must have to insert BEFORE /* That's all, stop editing! Happy blogging. */ in the wp-config.php file.

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    
    // Disable display of errors and warnings 
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors',0);
    
    // Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
    define('SCRIPT_DEBUG', true);
    

    sorce: https://codex.wordpress.org/Debugging_in_WordPress

提交回复
热议问题