cPanelOps · Hosting guides for site operators
cPanelOpsv2.2.0
Plain-English cPanel help from the team behind FirstResponderHost
26 guides live
CpanelOps / PageOps

Home › Guides

Troubleshooting

Out of disk space or inodes: finding what is filling your account

Uploads fail, email bounces, the site throws errors. How to see what is using the space, the usual culprits, and what is safe to delete.

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

WhatWhere to lookSafe to delete?
Old backupsHome folder: files named backup-…tar.gz; backup plugin folders inside the siteYes, after downloading the newest one.
Error logsFiles named error_log in site foldersYes. Read the last lines first; a huge one means an error is repeating.
CacheCache folders of your content system or pluginsYes, through the plugin's own "purge" button. It rebuilds.
EmailThe mail folder. Trash, Junk and Sent of each mailboxEmpty Trash and Junk. Archive old mail to your own computer.
File Manager's trashThe .trash folder in your home directoryYes. Deleted files sit here until emptied.
Old staging or test copiesForgotten subfolders and subdomainsYes, with their databases, once you are sure they are unused.
Unused themes and pluginsThe content system's own foldersYes. Delete them from its admin screen, not by hand.
Session and temp filestmp in your home folderOld ones, yes. Leave anything from today.
Uploaded originalsMedia folders: full-size photos and videosOnly 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, ssl or .cpanel in your home folder. cPanel needs them.
  • The mail folder 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_html first; 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_log instead 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.

Spotted a mistake, or a step that has changed?

cPanel's screens differ a little between versions and hosts. Tell us at info@firstresponderhost.com and we will correct the guide.

More guides