WordPress.org

Ready to get started?Download WordPress

Forums

Huge error_log file (7 posts)

  1. clickmarketing
    Member
    Posted 1 year ago #

    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?

  2. catacaustic
    Member
    Posted 1 year ago #

    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.

  3. ThorHammer
    Member
    Posted 1 year ago #

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

  4. usersamara
    Member
    Posted 7 months ago #

    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?!

  5. catacaustic
    Member
    Posted 7 months ago #

    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.

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

  7. alangkumitir
    Member
    Posted 5 months ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic