More actions
WordPress Debugging
Edit the site's wp-config.php file to enable WordPress debugging.
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', false ); define( 'WP_DEBUG_LOG', true );
That will prevent errors from being displayed on the site and instead log them to a wp-content/debug.log file.
PHP Debugging
Via .user.ini or php.ini
display_errors = on
To log errors to a php-debug.log file use the following syntax instead.
log_errors = on error_log = ~/php-debug.log
Via PHP Code
ini_set('display_errors','1'); ini_set('display_startup_errors','1'); error_reporting (E_ALL);