Your cPanel says you're nearly out of disk space, but you don't remember uploading anything big. Something is eating your disk space, and the trick is finding it. This guide shows how to find the large files and folders on your hosting account using File Manager, Email Disk Usage and a few SSH commands, lists the usual culprits, and explains what's safe to delete.
Why it matters
When an account runs out of space, things fail in confusing ways: email bounces with "mailbox full" or "quota exceeded", WordPress updates and uploads fail, backups can't be written, and databases can't save new data. Fixing it early saves a lot of head-scratching.
Your total usage is shown under Disk Usage in the Statistics panel on the cPanel home page. It includes everything: website files, email, databases, logs and hidden files. See Understanding cPanel Statistics: Disk Space, Bandwidth and Databases for what each figure means.
cPanel's own Disk Usage viewer tool (the one that draws a folder-by-folder chart) isn't included on our standard plans, so this guide uses the tools that are.
Step 1: Split the total into email, databases and files
Start broad. On the cPanel home page, the Statistics panel shows:
- Disk Usage -- the total.
- Database Disk Usage -- the part used by MySQL databases.
Then go to Email > Email Accounts and look at the Storage column for each mailbox. Add those up. Whatever is left after email and databases is files.
For most small-business accounts, email is the biggest single part. If that's the case for you, skip to Step 2. If files are the biggest part, go to Step 3 or Step 4.
Step 2: Clean up email with Email Disk Usage
- Go to Email > Email Disk Usage.
- Choose a mailbox from the Account menu. You'll see each folder (Inbox, Sent, Trash, Spam and your own folders) with its size.
- Click Manage next to a large folder to delete messages in bulk -- for example everything older than a year, or everything over 30 MB.
Deleting here is permanent, so save anything you need first. Full steps: How to Free Up Mailbox Space with Email Disk Usage.
Step 3: Hunt for big files in File Manager
File Manager can sort the files in a folder by size, which is enough to find most problems. It can't show you how big a folder is (folders show a small fixed size such as 4 KB), so you work through the likely folders one at a time.
- Go to Files > File Manager.
- Click Settings, tick Show Hidden Files (dotfiles) and click Save. Some of the biggest space users are hidden folders.
- Open your home folder (the house icon at the top of the folder tree).
- Click the Size column heading to sort. Click it again to put the biggest files at the top.
- Repeat in
public_html,public_html/wp-content,public_html/wp-content/uploadsand any folder with "backup" in its name.
Look especially for .zip, .tar.gz, .sql, .wpress, .mp4 and .log files, and files named error_log.
Step 4: Find the biggest folders with SSH (fastest)
If you're comfortable with a command line, SSH gives you the whole picture in seconds. Open Advanced > Terminal in cPanel (or connect with SSH -- see How to Use SSH, SSH Keys and Terminal in cPanel). These commands only read and list -- they don't change anything.
Size of every item in your home folder, including hidden ones, smallest to biggest:
cd ~
du -sh * .[!.]* 2>/dev/null | sort -h
Example output:
12M etc
48M logs
310M .trash
1.9G public_html
4.6G mail
Now drill into whichever is biggest. For example, inside your website:
du -h --max-depth=1 ~/public_html 2>/dev/null | sort -h | tail -15
du -h --max-depth=1 ~/public_html/wp-content 2>/dev/null | sort -h
Size of each mailbox (folders are named after the domain, then the user):
du -sh ~/mail/*/* 2>/dev/null | sort -h
Every file over 100 MB anywhere in your account:
find ~ -type f -size +100M -exec ls -lh {} + 2>/dev/null | awk '{print $5, $9}'
Change +100M to +20M to cast a wider net. To find oversized PHP error logs:
find ~/public_html -name error_log -size +5M -exec ls -lh {} + 2>/dev/null
If cPanel also warns about File Usage (the number of files, sometimes called inodes) rather than megabytes, count files per folder instead:
du --inodes --max-depth=1 ~ 2>/dev/null | sort -n | tail
Thousands of tiny files usually means a cache folder, a session folder, or a mailbox full of small messages.
The usual culprits
| What | Where to look | Safe to remove? |
|---|---|---|
| Old mail, Trash and Spam | mail/ -- manage with Email Disk Usage | Yes, through Email Disk Usage or your mail app. Don't delete mail folders by hand in File Manager. |
| Old backups you made yourself | .zip, .tar.gz or .sql files in your home folder or public_html; plugin folders such as wp-content/updraft, wp-content/ai1wm-backups or wp-content/backups-dup-lite | Yes, once you've downloaded any you want to keep. JetBackup 5 already backs up your account off the server. |
| WP Toolkit backups | Listed under Back Up / Restore on your site's card in Domains > WordPress Management | Yes -- delete old ones there, not in File Manager. |
error_log files | Any folder, especially public_html and wp-admin | Yes. Read the last lines first -- a huge log means something is erroring constantly, and it will grow back until you fix it. |
| Cache folders | wp-content/cache, wp-content/litespeed | Clear them from the plugin (for example Purge All in LiteSpeed Cache) rather than deleting by hand. |
| Image optimization backups | Original copies kept by image optimizer plugins, often next to the optimized images in wp-content/uploads | Only through the plugin's own "remove backups" option, and only once you're happy with the optimized images. |
| File Manager Trash | .trash in your home folder | Yes. In File Manager click View Trash, then Empty Trash. |
| Archived raw access logs | logs/ in your home folder | Yes, old months you don't need. Change the archive settings in Metrics > Raw Access so they don't pile up again. |
| Old copies of the site | Folders like public_html/old, public_html_backup, site-2019, or unused staging sites | Yes, after downloading if you want a keepsake. Remove WP Toolkit staging sites from WP Toolkit. |
| Large media | wp-content/uploads -- videos, huge photos | Remove from the WordPress Media Library, not File Manager, so pages don't show broken images. Host videos on YouTube or Vimeo instead. |
| A bloated database | Database Disk Usage on the home page; table sizes in phpMyAdmin | Clean up through the plugin that created the data (logs, stats, sessions). Take a backup first. |
What not to delete
- Folders in your home directory you don't recognize, such as
etc,ssl,tmp,.cpanel,.cagefsandaccess-logs. They hold your email settings, certificates, statistics and account configuration, and they're rarely large. - Anything inside
mail/by hand -- use the email tools. wp-content/uploadsas a whole,wp-config.php, or.htaccess.
If you're not sure, download a copy first, or ask us before deleting. Mistakes can usually be recovered from JetBackup 5 within about two weeks -- see How to Restore a File or Folder with JetBackup 5.
Troubleshooting
I deleted lots of files but Disk Usage didn't go down
Disk usage is recalculated periodically rather than instantly, so give it a while. Also check File Manager's Trash -- files deleted without ticking Skip the trash and permanently delete the files are moved to .trash and still count until you empty it.
The numbers from du don't match cPanel exactly
They're measured slightly differently and at different times, and du in your home folder doesn't include your databases. Use du to find where the space is, not to reconcile to the last megabyte.
The space keeps filling up again
Something is writing to disk continuously. Common causes: a plugin in a crash loop filling error_log, a backup plugin on a schedule saving to the server, or a mailbox receiving lots of spam. Run the find commands again a day later and see which file grew.
I can't delete a file -- "permission denied"
Check the file's permissions in File Manager and make sure it's inside your own account. If it still won't go, open a ticket with the full path.
Common questions
Do JetBackup 5 backups use my disk space?
No. Our automatic backups are stored off the server. Backup files you make yourself and leave in your account do count.
Why is my mail folder so large when my inbox is small?
Sent items with attachments, Trash, Spam and folders your mail app created (such as "Archive" or "All Mail") all count. Email Disk Usage shows them all.
Can I just get more space?
Yes, if you've genuinely outgrown your plan -- see How to Upgrade or Change Your Hosting Plan. It's worth cleaning up first; most full accounts are full of things nobody needs.
Related guides
- Understanding cPanel Statistics: Disk Space, Bandwidth and Databases
- How to Free Up Mailbox Space with Email Disk Usage
- How to Use cPanel File Manager to Manage Your Website Files
- How to Use SSH, SSH Keys and Terminal in cPanel
- How to Fix "Mailbox Full" Errors
Still stuck? Open a support ticket and the Instant Access Internet Services team will help.
