Wordpress

WordPress Disable Error Logging to avoid Huge Error Log File

wordpress-logo-style
In brief
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.

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 Comments

  1. igre

    not working for me on WP

    1. Vipin PG
      Vipin

      what version of wordpress are you using

  2. Jay Chong

    Not working because your code have extra “@” at the front. Remove the “@” will do.

  3. sunil

    sir , does it work on php 5.5.?

    1. Vipin PG
      Vipin

      yes it will

  4. ashak

    thank you so much sir for your info

  5. MrGB

    Great info sir thank you keep share with us..:)

Leave a Comment