Error Logs to Diagnose Error 500 in LAMP

You 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.

Leave a Comment