roots / bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure
https://roots.io/bedrock/
MIT License
6.15k stars 1.16k forks source link

Add `WP_DISABLE_FATAL_ERROR_HANDLER=true` constant to development #711

Open strarsis opened 5 months ago

strarsis commented 5 months ago

Summary

WordPress automatically sends an admin email when a fatal PHP error is encountered. However, this is usually not intended in development (it is very annoying/confusing actually).

Setting the WP_DISABLE_FATAL_ERROR_HANDLER constant to true prevents sending those WordPress admin error emails.

Config::define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

Additional context

https://wordpress.stackexchange.com/a/361002/134384