admin管理员组文章数量:1304959
My website says critical error on website after add my custom code but there is no any line related my custom code in log file.There are only 2 repater lines and they are standard for my website, not big problems.
also Wordpress doesn't show error message on browser except "critical error...".
how can I detect the code problem?
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'SAVEQUERIES', true );
define( 'SCRIPT_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
error_reporting(E_ALL);
ini_set('display_errors', 1);
My website says critical error on website after add my custom code but there is no any line related my custom code in log file.There are only 2 repater lines and they are standard for my website, not big problems.
also Wordpress doesn't show error message on browser except "critical error...".
how can I detect the code problem?
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'SAVEQUERIES', true );
define( 'SCRIPT_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
error_reporting(E_ALL);
ini_set('display_errors', 1);
Share
Improve this question
asked Jan 28, 2021 at 10:00
Faruk rızaFaruk rıza
982 silver badges11 bronze badges
3
|
1 Answer
Reset to default 0You could try the following wp-config.php setup - note WP writes to the file wp-content/debug.log - this config also stops any errors from being rendered to the browser.
Note that setting the constant WP_DISABLE_FATAL_ERROR_HANDLER to true
enables you to disabled the default WP error screen.
// Disable display of errors and warnings
@ini_set('display_errors',0);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'SCRIPT_DEBUG', false );
// disable WP fail-safe screen ##
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
本文标签: debugThere is no any line related the error but it says critical error
版权声明:本文标题:debug - There is no any line related the error but it says critical error 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741795617a2397922.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
wp-content/debug.log
file? Would that file be writable if it existed? Is the code in your question located inwp-config.php
? – Tom J Nowell ♦ Commented Jan 28, 2021 at 14:37