admin管理员组文章数量:1122832
I set define( 'WP_DEBUG', true );
&
define('WP_DEBUG_LOG', true);
. But error_log('hello');
is not printing any thing.
What could be the issue ?
I set define( 'WP_DEBUG', true );
&
define('WP_DEBUG_LOG', true);
. But error_log('hello');
is not printing any thing.
What could be the issue ?
Share Improve this question asked Apr 4, 2024 at 10:31 FoysalFoysal 4451 gold badge5 silver badges15 bronze badges1 Answer
Reset to default 2You'll find error_log output
- in WordPress's debug.log, under wp-content, if enabled
- in your web server's error log file, e.g.
- /var/log/httpd/error_log for Apache, or /var/log/apache2/error_log on Ubuntu
- /var/log/nginx/default-error.log for nginx
- or in your PHP FPM service's error log if you're running that instead
It generally won't get output in the web page, no. If you want that you can always echo
instead, but be careful not to echo until you've reached the point that WordPress is going to emit the page template: as soon as you echo you prevent the server sending any more HTTP headers.
本文标签: debugError logging in wordpress
版权声明:本文标题:debug - Error logging in wordpress 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736311603a1934799.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论