简体   繁体   English

在WordPress中进行调试

[英]Debugging in WordPress

How can I turn on debugging and error log in WordPress? 如何在WordPress中打开调试和错误日志? I am new to WordPress and would like to see how this could be done. 我是WordPress新手,想看看如何做到这一点。

I set define('WP_DEBUG', true); 我设置define('WP_DEBUG', true); in wp-config.php but this is not helping. wp-config.php中,但这没有帮助。 Is there an error log file? 是否有错误日志文件?

Thanks. 谢谢。

如果使用apache,则可以在httpd.conf中设置“ ErrorLog”和“ CustomLog”位置。

A little late but in case this helps someone else, add this to your wp-config.php file: 有点晚了,但是如果这对其他人有帮助,请将其添加到您的wp-config.php文件中:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

All errors are then written to debug.log located within the wp-content folder. 然后将所有错误写入位于wp-content文件夹中的debug.log。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM