Recommended Services
Supported Scripts
cPanel disk full and inode limit troubleshooting guide

When a cPanel account stops accepting uploads, WordPress shows “Disk quota exceeded”, or email bounces with “mailbox full”, the cause is one of two different limits: disk space or the cPanel inode limit. They look identical to the site owner but need different fixes. Space is measured in megabytes; an inode is a record the filesystem keeps for every single file and folder. A site with 300,000 tiny cache files can hit its inode limit while using only 2 GB. This guide shows how to tell which limit you have hit, how to find the culprit and how to clean up safely.

Disk Space vs Inodes: What Is the Difference?

Every file, directory, email message and symlink consumes exactly one inode, no matter how small. Hosting providers cap inodes (commonly 250,000 on shared plans) because millions of tiny files slow backups, indexing and filesystem checks for everyone on the server.

LimitWhat it countsTypical symptomHow to check
Disk spaceTotal bytes used“Disk quota exceeded”, failed uploads, full mailboxesdu, cPanel Disk Usage
InodesNumber of files and foldersCannot create files even with free space, backups faildf -i, cPanel Resource Usage

Step 1: Confirm Which Limit You Hit

In cPanel, open Files » Disk Usage for space, and the right-hand sidebar File Usage counter for inodes. From SSH:

# Quota for your account (space and files)
quota -s

# Count every file and folder under your home directory
find ~ -xdev | wc -l

As root on the server, check the whole filesystem for both:

df -h     # space
df -i     # inodes

If IUse% is near 100% while Use% is low, you have an inode problem rather than a space problem. This is also one of the less obvious reasons a server stops accepting mail or creating sessions, which we cover in our Linux disk space management guide.

Step 2: Find What Is Using Disk Space

Rank the biggest directories first. ncdu is the friendliest tool if installed; otherwise use du:

cd ~
du -xh --max-depth=1 | sort -rh | head -15

# Drill into the largest folder, then repeat
du -xh --max-depth=1 ~/public_html | sort -rh | head

The usual suspects on cPanel accounts are:

  • Old backups left in the home directory (backup-*.tar.gz) or created by plugins such as UpdraftPlus and Duplicator
  • Mailboxes with years of mail, especially Trash and Spam folders
  • Error logs that grew unchecked (error_log files scattered inside every plugin folder)
  • Cache folders and image-optimisation backups inside wp-content
  • Abandoned staging copies of sites

Step 3: Find What Is Using Your cPanel Inode Limit

Inode exhaustion is nearly always caused by directories holding enormous numbers of small files. Count files per top-level directory:

cd ~
for d in */ .[!.]*/; do echo "$(find "$d" -xdev 2>/dev/null | wc -l) $d"; done | sort -rn | head

Typical offenders are:

LocationWhy it fills up
~/mail/Every email is one file; 100,000 messages = 100,000 inodes
wp-content/cache/Page-cache plugins write thousands of small files
wp-content/uploads/Image plugins create 15-20 thumbnail sizes per upload
PHP session directoriesSites that never clean old sessions
~/tmp/, ~/.trash/Deleted files cPanel keeps until the trash is emptied
~/.cagefs/, .softaculousInstaller leftovers and temp data

Step 4: Clean Up Safely

Always take a manual backup before deleting anything you are unsure about. Then work through these in order, safest first.

  1. Empty the cPanel trash. In File Manager, click Empty Trash, or run rm -rf ~/.trash/*.
  2. Delete old backup archives you have already downloaded elsewhere.
  3. Purge website caches. In WordPress use your cache plugin’s Purge All button. Cache files regenerate automatically, so removing them is safe.
  4. Clean mailboxes. In cPanel » Email » Email Disk Usage, delete mail older than a year or empty Trash and Spam. Via SSH you can delete mail older than 180 days: find ~/mail -type f -mtime +180 -delete (run it without -delete first to preview).
  5. Rotate or remove oversized logs. Truncate rather than delete a live log: : > error_log.
  6. Remove unused plugins, themes and staging sites, including their databases.

To delete a directory containing millions of files quickly, rm -rf can stall; rsync with an empty directory is far faster:

mkdir /tmp/empty
rsync -a --delete /tmp/empty/ ~/public_html/wp-content/cache/

Special Case: Disk Free Space but Writes Still Fail

If df -h shows free space and df -i shows free inodes but you still see “No space left on device”, check for these:

  • Deleted files still held open. A process keeps a deleted log open, so the space is not released. Find them with lsof +L1 and restart the service.
  • Account quota versus filesystem. The partition may be fine while your user quota is exhausted. Run quota -s to confirm.
  • Reserved blocks on ext4 or XFS project quotas on the /home partition.

For Server Admins: Finding the Worst Accounts in WHM

If you manage the server, rank accounts by usage before the partition fills:

# Largest accounts by disk
du -sk /home/* 2>/dev/null | sort -rn | head -20

# Accounts with the most inodes
for u in /home/*; do echo "$(find $u -xdev 2>/dev/null | wc -l) $u"; done | sort -rn | head -20

In WHM, Account Functions » Modify an Account lets you raise a quota, and Server Status » Disk Usage shows partitions. Pair this with an automatic alert: a simple cron job that emails you when df crosses 85% gives you days of warning rather than minutes. See our cron jobs explained guide for the syntax.

How to Stop It Happening Again

  • Set up automatic cleanup: expire old backups, and configure mail retention.
  • Offload backups to remote storage instead of leaving archives on the account.
  • Use an object cache such as Redis instead of file-based caching to reduce inode use.
  • Limit WordPress thumbnail sizes in Settings » Media and by removing unused sizes from the theme.
  • Monitor inode use monthly, not just disk space.

Frequently Asked Questions

What is the default inode limit on cPanel?

cPanel itself does not impose a fixed number; the host sets it. Many shared plans use 250,000 to 500,000 inodes. VPS and dedicated servers usually have no per-account inode limit, only the filesystem total.

Does deleting files free inodes immediately?

Yes, once a file is deleted and not held open by a running process, its inode is freed. Files moved to the cPanel trash still count until you empty it.

Do emails count towards the inode limit?

Yes. Each message stored in Maildir format is a separate file, so a busy mailbox can use tens of thousands of inodes. Cleaning old mail is often the biggest single inode saving.

Why does cPanel show different disk usage from du?

cPanel Disk Usage includes databases, mail and sometimes hidden directories and is cached, so it updates hourly. du only measures what you point it at.

If you are repeatedly hitting these limits, your site may have outgrown its plan. Our managed VPS and server services take care of monitoring and cleanup for you.

Leave a Reply

Your email address will not be published. Required fields are marked *