admin管理员组文章数量:1404469
My Wordpress site is installed in a LAMP stack (Linux, Apache, MySQL, PHP).
Suppose I encounter HTTP error 500. What logs might help diagnose the issue? How can the logs be enabled? What are the normal filenames, and where are the log files normally stored?
I know it is possible to log some errors by adding these lines to wp-config.php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
What other logs should be reviewed?
My Wordpress site is installed in a LAMP stack (Linux, Apache, MySQL, PHP).
Suppose I encounter HTTP error 500. What logs might help diagnose the issue? How can the logs be enabled? What are the normal filenames, and where are the log files normally stored?
I know it is possible to log some errors by adding these lines to wp-config.php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
What other logs should be reviewed?
Share Improve this question asked Jan 26, 2020 at 19:22 Jacob QuisenberryJacob Quisenberry 1951 silver badge6 bronze badges1 Answer
Reset to default 2You are using Apache for your http server,it will keep it owns logs for access & errors, depending on how you have it configured.
By default Apache will probably use the following logs;
/var/log/httpd/access_log
/var/log/httpd/error_log
or
/var/log/apache2/access_log
/var/log/apache2/error_log
Log locations are in your Apache Config (/etc/httpd/). Check here for details.
Using WP_DEBUG
The WP_DEBUG flag will cause excessive logging of information, notices, warnings, errors, critical, etc.
WP_DEBUG_LOG when set to true saves information to /wp-content/debug.log
WP_DEBUG_LOG can have a log path set, for example;
define( 'WP_DEBUG', 'true' );
define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
You can get more info on debugging here. It is also worth noting it is not recommend using WP_DEBUG on production sites.
My advice, before enabling debug, would be view the access & error logs for your http server (Apache in your case). They might yield the information you need without the need for WP_DEBUG.
本文标签: Error Logs to Diagnose Error 500 in LAMP
版权声明:本文标题:Error Logs to Diagnose Error 500 in LAMP 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744802292a2625935.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论