
Your website goes down, email stops working, or you can't upload files. One of the most common causes on shared hosting is a full Disk Quota or Inode limit. This is fixable if you know the right steps. This article explains the difference between Disk Quota and Inodes, how to identify the cause, and how to clean up your DirectAdmin Hosting account effectively.
Disk Quota vs Inodes — What's the Difference?
Disk Quota — Total Data Size
Disk Quota is the limit on the total size of data you can store on your hosting account, measured in MB or GB. When you exceed this limit, the system refuses to write any new files. PHP applications that write cache files or logs will start generating errors immediately.
Inodes — Number of Files
An inode is a data structure on Linux that stores metadata about a file or directory. Every file and folder uses exactly one inode, even a zero-byte file. If you hit the inode limit before filling your disk space quota, the server cannot create any new files at all.
Common example: WordPress caching plugins like W3 Total Cache or WP Super Cache store cache files in wp-content/cache/. A busy site can accumulate hundreds of thousands of tiny cache files, exhausting the inode limit even when disk space looks fine.
What Is an Inode and Why It Fills Up While Space Remains
The most common question is "I still have several GB of space free, so why can't my site write files?" The answer lies in how the Linux filesystem works. Linux uses a structure called an inode (index node) to store the metadata of every file: its owner, permissions, last-modified time, and the location of the actual data on disk. Every file and every folder always uses exactly one inode, whether that file is 0 bytes or 500 MB.
This means your hosting quota has two completely separate dimensions. The first is "disk space," measured by the total size of your data. The second is "inode count," measured by the total number of files and folders. A site with a few large video files may consume lots of space but very few inodes. Conversely, a site with hundreds of thousands of tiny files may exhaust its inode allowance while using only a few hundred MB of actual space. When inodes run out first, the server refuses to create new files immediately, even though the disk space bar is far from full.
What Creates Huge Numbers of Tiny Files
The sources that drive inode counts up fastest are usually automated background processes that the site owner never sees:
- CMS cache files — WordPress, Magento or PrestaShop create separate cache files per page. A site with thousands of pages ends up with thousands to hundreds of thousands of cache files.
- PHP sessions — Every visitor can cause PHP to create a
sess_*file. Without cleanup, these accumulate by the thousands every day. - Mailbox messages — The Maildir format stores each email as a single file. A mailbox with 50,000 messages equals 50,000 inodes.
- Image thumbnails — WordPress generates several sizes per original image. Uploading 2,000 photos can turn into nearly ten thousand image files.
- node_modules / Composer vendor — A single project's dependency folder can contain tens of thousands of nested files.
How to Check Usage in DirectAdmin
There are two main places to check in DirectAdmin:
1. Account Summary Dashboard
The DirectAdmin home screen shows usage bars for Disk Space and Inodes with percentage consumed. If either exceeds 90%, take action immediately.
2. Disk Usage Tool
- Go to System Info & Files → Disk Usage
- Select the directory to analyze
- The tool lists folders sorted by size from largest to smallest
Finding the Largest Files via Command Line
If you have Shell Access, these commands pinpoint the biggest space consumers:
Find the Largest Directories
du -sh /home/username/* | sort -rh | head -20
Find the Largest Individual Files
find /home/username -type f -size +50M -exec ls -lh {} \; | sort -k5 -rh | head -20
Count Files in a Directory (check inodes)
find /home/username/public_html -type f | wc -l
Finding What Eats the Most Space and Inodes
Before deleting anything, you need to know where the culprit lives. Guessing usually deletes the wrong thing or misses the real cause. The systematic approach is to drill down from the largest folder one level at a time, looking at both dimensions separately — size and file count — because the thing eating your space is often not the thing eating your inodes.
Drill Down by Size with du
Start at the root of your account and step into the largest folder each time until you reach the real space consumer:
du -sh /home/username/public_html/* | sort -rh | head -15
When a folder looks abnormally large (for example wp-content), run the same command pointed inside it to find which subfolder is the source.
Count Inodes Per Folder
If disk space remains but inodes are nearly full, count files per subfolder to find the one creating the most:
| Goal | Command |
|---|---|
| Count files in each subfolder | for d in */; do echo "$(find "$d" -type f | wc -l) $d"; done | sort -rn |
| Count all files in the account | find /home/username -type f | wc -l |
| See inodes the system has left | df -i /home |
Inspect Cache, Logs and Email Specifically
These three sources are always prime suspects. Check each one:
find . -type d -name cache -exec sh -c 'echo "$(find "$1" -type f | wc -l) $1"' _ {} \;
ls -lh public_html/error_log
du -sh ~/imap/* 2>/dev/null | sort -rh | head
The first line finds every folder named cache at any depth with its file count, the second shows the size of error_log which can grow to several GB, and the last shows which mailbox uses the most space. If you do not have Shell Access, all of this can also be inspected through Disk Usage and the File Manager in DirectAdmin — just open folders in order of the size shown.
Files That Commonly Eat the Most Space
- WordPress Cache —
wp-content/cache/is safe to delete entirely - WordPress Backups — Backup plugins store zip archives in
wp-content/backups/ - Error Logs —
error_logandaccess_logfiles that grow indefinitely without rotation - Email Spam — Inboxes flooded with thousands of spam messages
- Session Files — Stale PHP session files in
/tmp/sess_* - Unused Themes/Plugins — Deactivated but not deleted WordPress themes and plugins
Deleting WordPress Cache via DirectAdmin File Manager
- Open DirectAdmin → File Manager
- Navigate to
public_html/wp-content/cache/ - Select all files and subfolders inside
cache/(keep the cache folder itself) - Click Delete
How to Reduce Space and Inode Usage
Once you know the culprit, the next step is to reduce the real load, not just delete once and let it fill up again. Split the work into three main areas: cache, email and images.
1. Clear and Control Cache
Cache is temporary; it is safe to delete and will be rebuilt when visitors arrive. What you should do:
- Delete everything inside
wp-content/cache/via File Manager, or use the "Clear Cache" button in your plugin. - Configure the cache plugin to keep files no longer than 24–48 hours. Do not set a TTL of weeks.
- If you use a file-based object cache, switch to an in-memory backend (such as Redis if your hosting supports it) so it stops creating many tiny files.
- Remove leftover debug/log files that some plugins leave behind, such as
wp-content/debug.log.
2. Manage Email to Reclaim Inodes
Each email is one file and one inode. Mailboxes that are never cleaned are the largest silent inode consumers:
- Open Webmail and empty the Junk/Spam and Trash folders completely.
- Set the system to auto-delete trashed messages every 30 days.
- Use IMAP instead of POP3, and enable deletion from the server after download so mail does not pile up across devices.
- If you have old email accounts no longer in use, back up their data and delete the account.
3. Optimize Images and Media
Images often consume both space and inodes (from multiple thumbnail sizes) at the same time:
- Compress images before upload with a plugin like Smush or ShortPixel, or manually keep them under 200 KB each.
- Reduce the number of thumbnail sizes WordPress generates by disabling sizes your theme never uses.
- Convert images to WebP format to cut file size by 25–35%.
- Delete unused media in the Media Library and clear old uploads unrelated to your current content.
Tip: After deleting many files, refresh the Account Summary page in DirectAdmin. Usage values may update slowly, roughly 1–4 hours, because the system recalculates quota in batches rather than in real time. Do not panic if the numbers do not drop immediately.
Preventing Inode Exhaustion in the Future
- Configure your cache plugin to auto-purge every 24–48 hours
- Add a Cron Job to remove old session files:
find /tmp -name "sess_*" -mtime +1 -delete - Enable log rotation so error_log never grows past 10 MB
- Move backups off the server to Google Drive or Dropbox
- Immediately delete unused themes and plugins, not just deactivate them
Prevent It Recurring and When to Upgrade Your Plan
Cleaning files treats the symptom. Without a prevention system, the problem returns in a few weeks. The key to prevention is making the "housekeeping" happen automatically and watching your usage trend regularly.
Set Up Automatic Cleanup
- Add a Cron Job to delete old sessions nightly:
find /tmp -name "sess_*" -mtime +1 -delete - Add a Cron Job to clear cache older than 2 days:
find ~/public_html/wp-content/cache -type f -mtime +2 -delete - Enable log rotation so
error_lognever grows past 10 MB and keeps only a few backups. - Configure your backup plugin to keep only 1–2 local archives and ship the rest to the cloud.
Watch the Usage Trend
Check the Disk Space and Inodes bars on the DirectAdmin Account Summary page at least once a month, and note the values to compare over time. If the numbers keep climbing every month even after cleaning, your site is genuinely growing — not just accumulating junk. That is the signal to plan for more space before you hit the ceiling.
When Upgrading Beats Cleaning
Consider upgrading your plan when any of these apply:
| Signal | What It Means |
|---|---|
| Still over 80% within 2–3 weeks of cleaning | Real usage exceeds the plan, not just junk |
| Inodes fill often despite cleanup Cron jobs | File count outgrows the inode quota |
| You must delete real content to make room | No junk left to remove — you need more space |
| Site grows fast from products/users/images | Expand ahead of time before hitting the limit |
Upgrading an AsiaGB Hosting plan is instant — no migration and no data loss. You get more SSD space and a higher inode quota at the same time, so you no longer waste time constantly clearing files.
Frequently Asked Questions
There is plenty of disk space left, so why can't I write files?
Almost always this is because inodes are exhausted before disk space. A huge number of tiny files such as cache, sessions or email use up the inode quota. Check the Inodes bar on the DirectAdmin Account Summary page. If it is near 100%, delete unnecessary small files and the server will be able to write new files again immediately.
Can I delete the entire cache folder? Is it safe?
You can safely delete the files inside the cache folder, but keep the cache folder itself. The system rebuilds cache files automatically when visitors arrive. Deleting cache does not remove your website content or database; these are only temporary files used to improve speed.
Email is using too much space and inodes. What should I do?
Empty the Junk and Trash folders in Webmail, set the trash to auto-delete every 30 days, and use IMAP instead of POP3 so mail does not pile up across multiple devices. If you have thousands of spam messages, select all and delete them in one go to reclaim inodes.
When should I upgrade my hosting plan?
If after cleaning up your disk or inode usage still exceeds 80% within a few weeks, or your site is genuinely growing from more products, images or users, it is time to upgrade. Upgrading an AsiaGB Hosting plan is instant, requires no migration, and no data is lost.
Need More SSD Storage?
AsiaGB Hosting offers multiple SSD plans with generous storage allocations. Starting from just 500 THB/year with DirectAdmin and 99% Uptime.
View Hosting Plans