You log into your hosting control panel and see a red bar. Disk usage at ninety-eight percent. Maybe your site stopped sending email, or WordPress won't update plugins. The host sent a warning email you ignored for a week.
A cPanel account is a chunk of storage your web host carved out for your website files, databases, email, logs, and backups. When that quota fills up, nothing new can be written. Email bounces, uploads fail, and scripts break in unpredictable ways.
This guide shows you exactly where space goes and how to reclaim it without breaking anything.
What cPanel disk usage actually includes
Your cPanel account measures disk usage across five main areas:
- Website files – everything in
public_htmlorwww, including your CMS installation, themes, plugins, uploaded images, and cached assets. - Email – messages stored on the server in IMAP or POP accounts, plus any spam or trash folders you haven't emptied.
- Databases – MySQL or MariaDB tables that power WordPress, Joomla, e-commerce platforms, and custom applications.
- Backups – compressed archives cPanel creates automatically if your host enables the feature, stored in
backups/or a similar directory. - Logs – Apache access logs, error logs, FTP logs, and email logs that grow every time someone visits your site or an SMTP connection happens.
The control panel homepage shows a pie chart or progress bar. That number is live. If it says you've used four gigabytes of a five-gigabyte quota, you have one gigabyte left.
Check your current disk usage breakdown
Log into cPanel. Scroll to the Files section and open Disk Usage.
You'll see a table listing every directory in your account with its size in megabytes or gigabytes. Sort by size. The biggest folders appear at the top.
In support tickets I handled, the top three offenders were always:
mail/– often sixty to eighty percent of total usage.public_html/wp-content/uploads/– years of unoptimized images.logs/ortmp/– forgotten access logs from high-traffic months.
Write down the three largest directories and their sizes. That's your attack list.
Clear old email messages from the server
Email piles up fast. A single inbox with attachments can consume gigabytes if you never delete anything.
Delete messages from webmail
Open Email Accounts in cPanel. Click Access Webmail next to any account. Choose Roundcube or Horde.
Select the Trash folder. Click the checkbox at the top to select all messages, then click Delete. Repeat for the Spam or Junk folder.
Next, go to Sent Items. If you have thousands of sent emails with attachments, select messages older than six months and delete them. The interface usually lets you filter by date.
Finally, check Inbox. If you see fifteen thousand messages, either archive them locally using an email client (Thunderbird, Outlook) or delete conversations you no longer need. This is the hard part. Most people never do it.
Switch email clients from IMAP to POP
IMAP keeps a copy of every message on the server. POP downloads messages and optionally deletes the server copy.
If you use an email client like Thunderbird, change the account settings to POP3. Enable the option to delete messages from the server after download. New mail will arrive in your client, then disappear from the server within a day or two.
Your cPanel email settings show the POP hostname and port – usually mail.yourdomain.com on port 995 with SSL.
Reduce email retention in cPanel filters
Some hosts let you auto-delete old messages via Email Filters or Email Deliverability. Create a filter that targets messages older than ninety days in Trash or Spam and permanently deletes them. Check the cPanel documentation for your host because this feature isn't universal.
Remove old backups and archives
Full account backups are huge. A single compressed backup of a WordPress site with a year of uploads can hit two or three gigabytes.
Open File Manager in cPanel. Navigate to your home directory (the top level, above public_html). Look for a folder named backups/, backup/, or files ending in .tar.gz or .zip.
Click the checkbox next to any backup older than one month. Right-click and choose Delete. Confirm the deletion.
If you need backups, download them to your local computer first. Right-click the file, choose Download, and wait for the browser to finish. Then delete the server copy.
Some hosts place backups in a hidden directory like .backup/ or .snapshot/. In File Manager, click Settings in the top right and enable Show Hidden Files. Refresh the page and check again.
Compress and rotate web server logs
Apache and Nginx write two logs for every website: an access log recording every HTTP request, and an error log capturing PHP warnings, 404s, and failed scripts.
On a site with decent traffic, access_log can grow to several hundred megabytes in a month. Error logs are usually smaller unless something is broken and logging the same error thousands of times per hour.
Find and delete old logs
In File Manager, navigate to logs/ or public_html/logs/. Sort by size.
You'll see files like:
access_log
access_log.1
error_log
error_log.1
The numbered files (.1, .2) are rotated older logs. Select any file older than two weeks and delete it. Keep the current access_log and error_log if you need them for troubleshooting.
If the current access_log is enormous and you don't need the data, you can zero it out. Select the file, click Edit, delete all contents, and save. The file remains but takes up almost no space.
Disable access logging for static assets
If you run a high-traffic site, every image, CSS file, and JavaScript file generates a log entry. Disabling logs for these file types cuts log growth by seventy percent or more.
Open File Manager, navigate to public_html/, and find .htaccess. If it doesn't exist, create it.
Add these lines:
SetEnvIf Request_URI "\.(gif|jpe?g|png|ico|css|js|woff2?)$" dontlog
CustomLog logs/access_log combined env=!dontlog
This tells Apache to skip logging requests for images, fonts, and stylesheets. Save the file. Log growth will slow immediately.
Some hosts override this at the server level. If the directive doesn't work, contact support and ask if they can enable it for your account.
Clean up WordPress uploads and caches
WordPress sites accumulate bloat in wp-content/uploads/ faster than anywhere else.
Delete unused media library files
Log into your WordPress admin panel. Go to Media → Library. Switch to list view.
Look for:
- Duplicate uploads from failed attempts.
- Old featured images from deleted posts.
- Screenshots or temporary files you uploaded for testing.
WordPress generates multiple thumbnail sizes for every image. When you delete an image from the media library, all its thumbnails also disappear.
If you have thousands of media files, install the Media Cleaner plugin. It scans your database, identifies unattached files, and lets you delete them in bulk. Run a backup first because the plugin can't undo deletions.
Remove old plugin and theme files
Navigate to wp-content/plugins/ in File Manager. Look for folders from plugins you deactivated months ago and forgot to delete. Each plugin folder can be ten to fifty megabytes.
Delete any folder that doesn't correspond to an active plugin. Check your WordPress admin under Plugins → Installed Plugins to confirm.
Repeat the process for wp-content/themes/. Unused themes pile up after testing. Keep your active theme and maybe one backup. Delete the rest.
Clear cache plugin storage
Caching plugins (W3 Total Cache, WP Super Cache, LiteSpeed Cache) store static HTML and minified assets in wp-content/cache/ or similar directories.
Over time, orphaned cache files accumulate when the plugin doesn't clean up properly. Navigate to the cache directory in File Manager and check its size. If it's over five hundred megabytes, purge it.
Most plugins have a Purge All Cache button in their settings. Use that first. If the folder is still huge, delete it manually. The plugin will recreate it on the next page load.
Optimize MySQL databases
WordPress databases grow because of:
- Post revisions (every save creates a new database row).
- Spam comments you never emptied from trash.
- Transient records from poorly coded plugins.
Run database optimization in phpMyAdmin
Open phpMyAdmin from the Databases section in cPanel. Select your WordPress database from the left sidebar.
Click Check All at the bottom of the table list. From the dropdown menu next to it, choose Optimize table. Click Go.
MySQL reclaims unused space and rebuilds indexes. The size reduction is usually modest – ten to fifty megabytes – but it's free and takes thirty seconds.
Delete post revisions and spam
Install the WP-Optimize plugin in WordPress. Go to WP-Optimize → Database.
Check these boxes:
- Clean all post revisions.
- Remove spam and trashed comments.
- Delete expired transients.
Click Run all selected optimizations. The plugin shows how many rows it removed. I've seen databases shrink by two hundred megabytes after years of neglect.
What to do if you're still over quota
You cleared email, deleted backups, purged logs, and cleaned WordPress. The disk usage bar barely moved.
Three possibilities:
- Your site legitimately needs more space. If you run an e-commerce store with ten thousand product images, five gigabytes isn't enough. Upgrade your hosting plan or move to a VPS.
- A file or directory is hidden. Check
.trash/,.cpanel/, or other dot-directories in File Manager with hidden files enabled. Some backup scripts dump archives into hidden folders. - Inode usage is high. cPanel accounts have two limits: disk space and inode count (total number of files). A site with a hundred thousand tiny files can hit the inode limit before filling disk space. Run
find ~ -type f | wc -lin Terminal to count files. If it's over two hundred thousand, you probably have a cache or log explosion. Dig intotmp/and session directories.
Contact your host if you've exhausted all options. They can check for filesystem issues or stuck processes writing logs in a loop.
Common mistakes to avoid
Deleting the wrong files. Never delete anything in public_html/ unless you know what it does. One missing file can break your entire site. If unsure, download a backup first.
Leaving email on the server forever. IMAP is convenient until it isn't. Decide whether you need server-side email history or if local storage works better.
Ignoring the problem until it's urgent. Once your quota hits one hundred percent, cPanel stops letting you upload anything – including the backup you need to fix the issue. Check disk usage monthly.
Compressing files that are already compressed. Zipping a JPEG or MP4 file saves almost nothing and wastes CPU. Focus on log files, SQL dumps, and uncompressed text.
Where space really goes
Email is the silent killer. Check that first. Then tackle uploads and logs. Optimize databases last because the gains are smallest.
Most cPanel accounts stay under quota if you clear email trash monthly and delete backups after downloading them. Set a calendar reminder. Disk space doesn't manage itself, but the maintenance takes five minutes once you know where to look.
