For security reasons, you should always disable errors that occur on the front, on live sites.
If you want to hide errors in Wordpress and get an error log for viewing, you can do something like the following in your wp-config.php file:
// Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); // Disable display of errors and warnings define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
PS: if you want to use the remove_action code from alexg above, remove_action('shutdown', 'wp_ob_end_flush_all', 1); you will need to put it in the functions.php file of your theme.
PPS: You can also try using define('WP_MEMORY_LIMIT,1024M); in your wp-config.php file - however, be careful not to allocate more than you need, as this affects the external interface of Wordpress, and you run the risk of running out of RAM if you have too many simultaneous page calls.
source share