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?

1 Answer 1


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;




Log locations are in your Apache Config (/etc/httpd/). Check here for details.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.