Support » Fixing WordPress » Huge error_log file

  • We have receive a “Disk Usage Full” warning email. We then found out that the error_log file at / and/or /wp-admin is very big.

    Is it OK to disable the error logging? If yes, how? If not, is it possible to limit the size of the error_log file so that it won’t take up much space?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You’d be a LOT better off fixing the errors that are creating that log file in the first place. You’ll find what they are easily by opening the file and reading what the error messages are. That way it will be fixed for good.

    And beware: this *might* be an indication that somebody is trying to hack the site.

    usersamara

    (@usersamara)

    Please reply to the topic question !

    For development reason, in the file wp-config.php I entered user with read-only privileges to mySQL DB – now I have same problem like clickmarketing .

    I have carefully read http://codex.wordpress.org/Editing_wp-config.php
    Adding in the wp-config.php these lines had no effect:

    @ini_set( 'error_reporting', '0' );
    ini_set('log_errors','Off');
    @ini_set( 'log_errors_max_len', '1024' );
    @ini_set( 'ignore_repeated_errors', 'On' );
    @ini_set( 'ignore_repeated_source', 'On' );
    @ini_set( 'log_errors', 'Off' );
    @ini_set( 'display_errors', 'Off' );

    I even created a .htaccess file in the wp-admin directory:

    php_flag log_errors offphp_flag log_errors off

    Which core file should I edit to limit the size of the error log?!

    catacaustic

    (@catacaustic)

    Please reply to the topic question !

    OK…

    You’d be a LOT better off fixing the errors that are creating that log file in the first place. You’ll find what they are easily by opening the file and reading what the error messages are. That way it will be fixed for good.

    Even though your situation is not the same as the OP the answer remains eactly the same. Fix the errors and you won’t get tne error_log file. It’s as simple as that.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    usersamara – Make your own topic please. Per our forum guidelines, we like every person to have their own topic.

    try to enter this code to wp-config.php

    define('WP_DEBUG', false);
    
    @ini_set('log_errors','Off');
    @ini_set('display_errors','Off');
    @ini_set('error_log','phperrors.log'); // path to server-writable log file
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Huge error_log file’ is closed to new replies.