WordPress.org

Ready to get started?Download WordPress

Forums

Deleting debug.log (4 posts)

  1. AriesCZ
    Member
    Posted 2 years ago #

    Is it safe to delete debug.log file?
    I have never done it on my site and it has gotten really big (like over 2GB big), but I am worried that deleting it may cause some problems for my WP installation... i quess not, because it is just log file, but better safe than sorry, right?

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    What is generating the log?

  3. AriesCZ
    Member
    Posted 2 years ago #

    Not sure exactly, I think it is the "general" WP debug log (it is located in wp-content folder).
    I just found out that I have debug mode activated in wp-config (I activated it when I was trying to fix one plugin, I think it was for sitemaps, but I did believe I disabled it after that, guess not)

    I did not read through entire log (did not want do download over 2GB, but it listed events from some unsupported function from my old theme from over 8 months ago).

    I think it should be safe to delete it, i just want to be sure that nothing can go wring

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Oh - you really shouldn't have debug turned on in a live site. It creates a serious security risk. Debug is for testing/development purposes only. Edit wp-config.php and remove:

    define('WP_DEBUG', true); // added to output any plugin or theme errors
    define('WP_DEBUG_LOG', true); // added to output to wp-content/debug.log

    Then just delete the debug.log file

Topic Closed

This topic has been closed to new replies.

About this Topic