WordPress Disable Error Logging to avoid Huge Error Log File

Sometimes the WordPress error log file will create huge headache for some users since it creates huge file in some cases. It will sometimes affect the hosting too if you have only less space in your server. In order to avoid logging of error, please add the following code in your wp-config.php file. Add the code below define(‘WP_DEBUG’, false); line.

@ini_set('log_errors','Off'); // enable or disable php error logging (use 'On' or 'Off')
@ini_set('display_errors','Off'); // enable or disable public display of errors (use 'On' or 'Off')

Done, no more error logging now.

7 thoughts on “WordPress Disable Error Logging to avoid Huge Error Log File”

Leave a Reply to Vipin Cancel reply