A full hosting account fails in confusing ways. Uploads stop with vague errors, incoming email bounces, the content system cannot save a post, and sometimes the whole site shows a database error. None of the messages say "disk full". If several unrelated things break on the same day, check the account's usage before anything else.
Two limits, not one
cPanel's sidebar shows both:
- Disk Usage: the total size of everything in the account, including files, databases and email.
- File Usage, often called inodes: the number of files and folders, whatever their size. Every email, every cached page and every thumbnail counts as one.
You can hit the file limit with plenty of space to spare. A cache folder holding 200,000 tiny files uses little space and a great many inodes.
See where it went
Open Disk Usage in cPanel (in the Files section). The chart at the top shows each top-level folder; the list at the bottom can be expanded folder by folder and sorted by size. In a terminal, this lists the largest items in your home folder:
du -sh ~/* ~/.[!.]* 2>/dev/null | sort -h | tail -15
For the number of files in each folder, which is what matters for the inode limit:
for d in ~/*/; do echo "$(find "$d" | wc -l) $d"; done | sort -n | tail
Run the same thing one level down inside whichever folder tops the list, and repeat until you reach the cause.
The usual culprits
| What | Where to look | Safe to delete? |
|---|---|---|
| Old backups | Home folder: files named backup-…tar.gz; backup plugin folders inside the site | Yes, after downloading the newest one. |
| Error logs | Files named error_log in site folders | Yes. Read the last lines first; a huge one means an error is repeating. |
| Cache | Cache folders of your content system or plugins | Yes, through the plugin's own "purge" button. It rebuilds. |
The mail folder. Trash, Junk and Sent of each mailbox | Empty Trash and Junk. Archive old mail to your own computer. | |
| File Manager's trash | The .trash folder in your home directory | Yes. Deleted files sit here until emptied. |
| Old staging or test copies | Forgotten subfolders and subdomains | Yes, with their databases, once you are sure they are unused. |
| Unused themes and plugins | The content system's own folders | Yes. Delete them from its admin screen, not by hand. |
| Session and temp files | tmp in your home folder | Old ones, yes. Leave anything from today. |
| Uploaded originals | Media folders: full-size photos and videos | Only if you have copies. Resize before upload in future. |
Email is often the biggest
Open Email Disk Usage in cPanel. It lists each mailbox's folders by size and offers one-click cleanup for messages older than a year, messages over a certain size, or everything in Trash. A mailbox that has collected spam for years can outweigh the website.
Databases grow quietly
The MySQL Databases page shows each database's size. The usual causes of a bloated one are years of stored post revisions, logs kept by a security or statistics plugin, and expired temporary entries. Most content systems have a cleanup plugin for this. Take a database backup before running one.
What not to delete
- Anything in
etc,sslor.cpanelin your home folder. cPanel needs them. - The
mailfolder itself, or the folders inside it named after domains. Empty mailboxes from the email screens instead. - Files whose purpose you do not know inside a working site. Move them to a folder outside
public_htmlfirst; if nothing breaks in a week, delete them.
After freeing space
Things that failed while the account was full do not always recover by themselves. Check that the site loads, that you can save a post, and that a test email arrives. If a database table was being written when the disk filled, it may need repairing: phpMyAdmin has a Repair option on each table.
Stopping it happening again
- Download backups and delete them from the server the same day.
- Fix the error behind a growing
error_loginstead of only deleting the file. - Set cache plugins to expire old files.
- Put a monthly reminder in your calendar to look at the two usage figures. A slow climb is easy to deal with; a full account on a busy day is not.
Common questions
The figure in cPanel has not gone down after I deleted files.
Usage is recalculated on a schedule, often every few hours. Also empty File Manager's trash; files moved there still count.
Is it worth paying for more space?
If the space is used by things you need, such as years of photos, yes. If it is logs, caches and old backups, clearing them out is free and the problem would only return on a bigger plan.