admin管理员组文章数量:1326328
I'm getting the error: 'There has been a critical error on your website. Learn more about debugging in WordPress.'.
How do I display which error I'm getting in the frontend?
I have these three lines in my wp-config.php-file:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );
It surprises me that enabling WP_DEBUG, doesn't show it.
I can (however) still find the errors in /wp-content/debug.log
, - but it's just an extra step in development, having to open that file and find the error.
How do I just get the proper error displayed on the page, - and not hid away in that debug.log-file?
I can see that WP_DEBUG is enabled, since this:
echo '<pre>';
print_r( WP_DEBUG);
echo '</pre>';
die();
... returns: 1
.
I'm getting the error: 'There has been a critical error on your website. Learn more about debugging in WordPress.'.
How do I display which error I'm getting in the frontend?
I have these three lines in my wp-config.php-file:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );
It surprises me that enabling WP_DEBUG, doesn't show it.
I can (however) still find the errors in /wp-content/debug.log
, - but it's just an extra step in development, having to open that file and find the error.
How do I just get the proper error displayed on the page, - and not hid away in that debug.log-file?
I can see that WP_DEBUG is enabled, since this:
echo '<pre>';
print_r( WP_DEBUG);
echo '</pre>';
die();
... returns: 1
.
1 Answer
Reset to default 1Ahh! I found it.
If I did this:
phpinfo();
die();
Then I could see that 'display errors` was set to off.
So if I added this in the top of my functions.php
: ini_set('display_errors', 1);
, then it started showing the errors.
本文标签: debugHow to show the error causing the 39There has been a critical error on your website39
版权声明:本文标题:debug - How to show the error causing the 'There has been a critical error on your website'? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742203156a2432332.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论