How to trace what is causing WordPress error 500?

2019-04-07 04:10发布

问题:

Internal error 500 is such a general error and nothing shows up in the logs under /wordpress/error_log. Is there a way to get a stack trace of where the crash is occurring? In ASP.NET it is so easy because a stack trace, code snippet, and line number all show up in the error page. Any help would be greatly appreciated.

回答1:

Turn on php errors in your php.ini or add this line to your .htacess file in your webroot:

php_flag display_errors on