When developing a WordPress site, on your local or development environment, its imperative to have the debug log turned on, in order to catch any errors/warnings before shipping the code further. Its quite easy to do, by simply setting these constants in wp-config.php
:
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true ); // WP 5.2 and later
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
The purpose of this is to
wp-content/debug.log
so that you can tail it locally and be aware of any error/warning that occurs when running the site.To learn more about these constants (and a few more) that we can define in wp-config.php
please refer WordPress Codex page for debugging.