You open File Manager to see why your account is nearly out of space, and there it is: a single file called error_log weighing 3 GB. Nobody put it there on purpose. PHP wrote it, one warning at a time, until it ate your quota. Here's how to find these files, empty them safely, and stop them coming back.

Symptom: disk usage climbs but your content hasn't changed

The usual signs look like this:

  • cPanel shows disk usage near 100% even though you haven't uploaded anything lately.
  • Backups suddenly take much longer or fail.
  • Files named error_log appear in public_html, wp-admin, wp-content/plugins/some-plugin and other folders.
  • The site feels slower, because PHP is spending time writing the same warning on every request.

Cause: PHP logs per directory, and it never rotates

On shared cPanel hosting, PHP writes errors to a file called error_log in the same folder as the script that triggered the error. Visit ten different plugin folders that throw warnings and you get ten log files. Nothing trims them. A deprecation notice that fires on every page view can add several MB an hour on a busy site.

Common triggers:

  • Deprecation warnings after a PHP version upgrade (old plugin, new PHP).
  • A plugin calling a function that no longer exists.
  • A bot hammering a broken URL that fails every time.
  • A cron job or script stuck in a failure loop.

Fix: find the big files first

If you have SSH or Terminal in cPanel, this lists every error_log over 10 MB, biggest first:

find ~/public_html -name error_log -size +10M -exec ls -lhS {} + 2>/dev/null

To see the total they take up:

find ~ -name error_log -type f -exec du -ch {} + 2>/dev/null | tail -1

No terminal? In File Manager, use the search box (top right), search for error_log, and sort the results by size. Make sure Show Hidden Files is ticked in Settings.

Read before you delete

The log is telling you what's wrong, so look at the last few lines first:

tail -n 30 ~/public_html/error_log

If you see the same line over and over, that's your real problem. Emptying the file only buys you time.

Empty it without breaking anything

Truncate the file instead of deleting it. PHP will keep writing to it happily:

: > ~/public_html/error_log

Deleting also works, since PHP recreates the file on the next error. Truncating is just tidier. To clear them all at once:

find ~/public_html -name error_log -type f -exec truncate -s 0 {} +

Fix the source of the noise

What the log showsLikely fix
Deprecated: ... (repeated)Update the plugin/theme, or set the PHP version one step lower in MultiPHP Manager
Undefined variable / array keyUpdate the plugin; report it to its developer
Fatal error: Call to undefined functionA required PHP extension is off. Enable it in Select PHP Version
Same 404 or include failure every secondRemove the broken cron or block the bot

Then decide how much PHP should log. In MultiPHP INI Editor (cPanel → Software), set error_reporting to hide notices and deprecations:

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
log_errors = On

You still get real errors in the log, minus the chatter. For WordPress, also check that WP_DEBUG_LOG in wp-config.php is false on a live site. A forgotten true there writes wp-content/debug.log, which grows just as fast.

Prevention: keep it from coming back

  1. Add a monthly cron job that trims the logs. In cPanel → Cron Jobs, run this weekly:
    find /home/CPANELUSER/public_html -name error_log -type f -size +50M -exec truncate -s 0 {} +
    Replace CPANELUSER with your username.
  2. Check Metrics → Errors in cPanel after any PHP or plugin update.
  3. Remove plugins you don't use. Inactive plugins can still be loaded by mistake and log errors.
  4. Keep an eye on disk usage with the Disk Usage tool, which shows the biggest folders at a glance.

On a VPS you manage yourself, set up logrotate for your PHP and web server logs instead of a cron truncate. It compresses old logs and removes them on a schedule.

When it isn't error_log

If you've cleared the logs and usage is still high, look at backups stored in your home folder, old .zip files in public_html, and mail in the mail folder. The Disk Usage tool in cPanel will point out which one it is. If you're stuck, open a ticket with SkyServer support and tell us which folder looks heavy. We'll help you trace it.

Frequently Asked Questions

Is it safe to delete error_log?

Yes. It's only a text log. PHP creates a fresh one the next time an error happens. Read the last lines first so you know what was going wrong.

Why do I have error_log files in so many folders?

PHP writes the log next to the script that failed. Each folder with a failing script gets its own file. Setting a single log path in MultiPHP INI Editor is one way to consolidate them.

Will turning off display_errors hide the problem?

It hides errors from visitors, which is what you want on a live site. With log_errors still on, you can read them in the log whenever you need to.

Do error_log files count toward my disk quota?

They do. They count like any other file in your home directory, and they're included in backups too.

The file keeps growing right after I empty it. What now?

Something is failing on every request. Run tail on the file, find the repeated message, and fix or disable the plugin or script behind it.