How To Delete Error_Log Files In cPanel

Error_Log Files can over time build up in your Web Hosting account and consume valuable disk space. These files are generated automatically by PHP to record website errors. While useful for debugging, they can become clutter if not managed.

If you’re making use of Domains.co.za hosting, you can automate the cleanup process by scheduling a cron job in cPanel to delete error log files regularly from your site. In this guide, we show you how to safely set up a cron task in cPanel to delete unwanted error log files.

How to Delete Error_Log Files in cPanel

This article assumes that you have already logged into your Domains.co.za Account and have accessed the cPanel Dashboard – refer below for steps on how to do this.

How To Delete Error_Log Files In cPanel - cPanel Dashboard

How to Access Error_Log in cPanel

  1. Scroll down to Advanced and click Cron Jobs.
How to Delete error_log Files - cPanel Domains Tools

How to Setup Error_Log in cPanel

2. Under Add New Cron Job, select how often you want the task to run (e.g. once daily).

How to Delete Error_Log

How to Delete error_log Files - cPanel Domains Tools

3. Replace yourcpanelusername with your actual cPanel username.

4. Click Add New Cron Job to save the task.

Once set, the cron job will automatically find and delete error_log files in your website directory at the interval you selected.

Additional Information

Why Setup an Error_Log?

Setting up a cron job to manage error_log files helps you maintain a clean hosting environment and avoid disk usage warnings.

Cron Job Essentials

Be cautious with the -delete command. Always double-check your file path to ensure you’re not removing important files.

General Cron Job Information

  • You can adjust the cron frequency based on how active your site is – daily or weekly is usually sufficient for most websites.
  • This method works for standard Linux hosting with cPanel provided by Domains.co.za.
  • If you’re unsure of your cPanel username or root directory, check under File Manager in cPanel or contact Domains.co.za support.
  • Consider downloading your error_log files manually if you wish to retain error records for analysis before deleting them.
  • Cron jobs are powerful tools: use them responsibly and only for tasks you fully understand.

Regularly cleaning up error_log files helps improve hosting efficiency and keeps your account from hitting storage limits.

Login to Domains.co.za Account

1. Go to the Domains.co.za Login website page.

How To Login To cPanel - Login in to Domains.co.za Account

2. Enter your Email and Password and click the “Sign In” button.

3. You will see the Domains.co.za Dashboard, displaying the Manage Account menu on the left and your Account Information, Account Overview and Open Support Tickets on the right.

How To Login To cPanel - Domains.co.za Dashboard

Login to cPanel from your Domains.co.za Dashboard

4. Click on Manage Services to view the sub-dropdown menu and select the hosting package for the domain you want to work with – in our example we are using Web Hosting.

How To Login To cPanel - Manage Services WordPress

5. Click the Manage button to the right of the domain name you want to access.

6. The display will now show Product Information, Quick Manage, Resource Usage and Site Statistics for that domain name.

How To Login To cPanel - Manage Services WordPress

7. Under Product Information, scroll down to Control Panel, which will display cPanel to the right, and click on the Login button.

How To Login To cPanel - Manage WordPress Hosting

8. The cPanel Dashboard will now be displayed.

What Our Customers say...