How to Clear cPanel Error Log

How to Clear cPanel Error Log on a CentOs 6 server. The cPanel automatically logs activity of a web server to make it easy for the administrator to find and correct broken links and other problems. After correcting what was causing these errors, it can be worthwhile to delete or remove the accumulation of errors from this log. The following covers specifically how I do this.

Note: The following assumes you have SSH (shell access) to your server.

How to Clear cPanel Error Log

Clear cPanel Error Log

  1. Login to your server using an SSH client.
  2. To clear the Apache errors, type the following and press Enter
    cat /dev/null> /usr/local/apache/logs/error_log
  3. To delete PHP error_log files, type the following and press Enter
    find /home -type f -name error_log -delete

If all goes well, your error log should now be clean, until next time. 😉