On shared hosting, free disk space does not necessarily mean you can create more files: your account may have reached its inode limit. Hosting inode usage tracks filesystem objects such as files and directories, rather than their size. If your provider enforces a hard inode limit, creating new files — logs, cache, emails, uploads — can fail, even when disk space remains. That can break updates, uploads, cron jobs and sometimes even your whole site. The good news: inode problems are usually fixable with smart file management and regular cleanup, without immediately jumping to a bigger plan. In this guide, we’ll explain exactly what inodes are, how to check your usage, what typically fills them up, and a practical, step‑by‑step cleanup strategy you can repeat every few months. We’ll also look at when it makes sense to offload some data or upgrade to a VPS or dedicated server at dchost.com.
On Linux-based hosting (including most shared hosting platforms), every file and directory is represented by an inode. Think of an inode as a filesystem record holding metadata about a file or directory. Whether a regular file is 0 bytes or 50 MB, it still uses one inode; hard links to that same file share its inode.
That leads to an important detail: inode limits are about quantity, not size. You can have an account that uses only 2 GB of disk, but still hits the inode limit because it holds hundreds of thousands of tiny cache files, emails or logs.
On shared hosting, providers set inode limits to:
- Keep file systems fast and healthy for everyone on the server
- Prevent one account from creating millions of small files and affecting backups
- Limit uncontrolled file growth from malware, misconfigured scripts or runaway cron jobs
If an enforced inode limit prevents new file creation, you may see symptoms like those below. These errors can also have other causes, so confirm inode usage and the applicable limit before treating cleanup as the solution:
- WordPress or application updates failing with “could not copy file” errors
- New email messages not being stored in mailboxes
- Backups failing because new archive files cannot be created
- File uploads in WordPress, Laravel or custom apps randomly failing
So avoiding inode limits is not just a “quota game”; it’s about keeping your hosting account stable and predictable.
How to Check Inode Usage in cPanel and Other Panels
Before cleaning anything, establish how many inodes you are using and where. Panel features and labels depend on the provider. DirectAdmin also supports inode tracking and limits, but do not assume it uses cPanel’s menu paths. In any panel, look for an explicitly labelled inode or file-usage statistic; if it is absent, ask your provider for the count, limit and directories included.
Checking inode usage in cPanel
If your shared hosting uses cPanel, you will typically find inode usage here:
- cPanel dashboard > Statistics: look for “File Usage”. It is visible only when your provider enables it; distributed accounts may show “Local File Usage” for the local server.
- cPanel > Disk Usage: use this to investigate disk space, not as a substitute for a file count. If inode usage is not displayed, ask your provider for the account total and limit.
Compare usage and the inode limit only when they cover the same scope. For a distributed cPanel account, Local File Usage excludes files on the child node; ask your provider how to obtain that usage and which quota applies. Confirm any missing limit or unclear scope before calculating a percentage. For example, 185,000 files and directories against a 200,000 limit covering those same files is 92.5% usage. This is an illustrative calculation, not a guaranteed panel display. Start cleanup while sufficient headroom remains for expected growth, updates and backups; 80–90% can be an early planning signal, not a universal failure threshold.
Using File Manager or SSH to investigate file counts
Even if you don’t have full SSH (or don’t feel comfortable using it), you can still identify inode-heavy directories:
- Open cPanel > File Manager
- Inspect main folders (like
public_html,logs,mail) for large collections of files; use recursive file counts if your panel provides them - Inspect likely high-count directories, such as cache folders; sorting by file size alone can miss thousands of tiny files
If you do have SSH access and basic Linux familiarity, you can run commands like:
cd ~/public_html || exit
find . | wc -l
# or per subdirectory
find wp-content -maxdepth 2 -type d -print0 |
xargs -0 -I{} sh -c 'printf "%s: " "$1"; find "$1" | wc -l' sh '{}'
These commands only read directory listings. They estimate file and directory counts under public_html, not account-wide inode usage: mail and other directories may be elsewhere. Hard links, filenames containing newlines and inaccessible directories can make the counts differ from actual inode usage. The second command is WordPress-specific; each total includes descendants, so overlapping totals must not be added together.
The following categories are useful places to investigate high inode usage. Identify what each directory contains before deciding whether it is safe to clean. Do not delete live application core files, configuration files or required dependencies to reduce the count. Large vendor, node_modules and .git directories may support runtime or deployment requirements; check those requirements before removing anything. If usage rises suddenly alongside unexpected PHP files in upload directories or many unexplained files, investigate a possible compromise rather than treating the files as ordinary cleanup candidates.
1. Application and plugin cache folders
CMSs and frameworks can generate many files when configured to use file-based caching:
- WordPress:
wp-content/cache/, file-based page caches, page builder caches - Magento / PrestaShop: version-dependent locations such as
var/cacheorcache/directories - Laravel and other frameworks:
storage/framework/cache, compiled views, sessions
If expired cache entries are not cleaned up, file counts can grow quickly, especially on busy stores or sites with thousands of URLs and multiple cached variants. Session files need separate care: follow the application’s session-expiry and cleanup guidance rather than treating active sessions as disposable cache.
2. Old backups stored inside your account
Check for retained backups under public_html or in a backup folder, including:
- Full cPanel backups generated manually and never removed
- WordPress backup plugins (UpdraftPlus, Duplicator, etc.) storing dozens of archives locally
- Per-day or per-week database dumps saved in a subdirectory by cron
Each backup archive might contain tens of thousands of files, but one archive file uses one inode; its contents do not count separately unless extracted. Archives therefore usually consume far more disk space than inodes. A backup process that stages separate file copies can temporarily use many inodes, and each archive chunk or unpacked backup file also uses an inode.
We have a dedicated article on WordPress backup strategies for shared hosting and VPS if you want a deeper backup design.
3. Email accounts and never-cleaned mailboxes
If you host email on the same shared account using Maildir storage, each message is normally a separate file using an inode. Other mailbox formats have different file-count characteristics. Over years, especially with IMAP and many folders, mail storage can easily hit hundreds of thousands of files per domain.
Large Sent, Trash and Spam folders are common culprits, especially when users never archive old messages or configure automatic cleanup rules.
4. Logs, temporary files and session files
Many apps and libraries write logs by default:
- PHP error logs, application logs, access logs kept for months
- Debug logs from plugins, staging tools, or payment integrations
- Session files stored on disk instead of Redis/Memcached
On shared hosting, you often don’t control system-wide logs, but you can control logs under your home directory (like public_html/error_log or storage/logs/). Some of these logs can grow both in size and number of files.
5. Abandoned test sites and old app versions
Look for unused copies such as:
- Multiple old copies of the same WordPress site (e.g.,
oldsite/,backup-2022/,test/) - Previous versions of a Laravel or custom PHP app left on disk “just in case”
- Staging subdomains that were never cleaned up
Each of these may be a full copy of your application — thousands of files you don’t actually need in production.
Step‑by‑Step Cleanup: Safely Reducing Inode Count
Here’s a practical cleanup routine for shared hosting accounts before considering a change of plan. Take it slowly, and always keep at least one recent backup.
Step 1: Take a fresh backup (but store it smartly)
Before deleting anything, secure a current backup. If the account is already at its inode limit, creating a local backup may fail or exhaust the remaining headroom. In that case, copy files directly to off-account storage and export databases there, or ask your provider for backup assistance. Keep any temporary local archive outside the public web root, and do not leave it in the inode-limited account indefinitely.
- Use your control panel’s backup tool or a WordPress/plugin backup if there is sufficient headroom. Include the files and databases you will change; a site-only backup may not include email.
- Download the backup to your computer.
- Delete the backup file from the hosting account only after verifying that the downloaded archive is readable and contains the required data.
If you’re planning a more advanced strategy, you can later move to off-site backups using object storage. Our article on automating off-site backups to object storage with rclone and restic shows one approach that avoids filling your shared account with archives.
Step 2: Clean application caches the proper way
Avoid manually deleting cache folders from File Manager unless you know what you’re doing; some apps may recreate them incorrectly or throw permissions errors. Instead:
- WordPress: use your cache plugin’s “Clear all cache” / “Purge all” button. If using LiteSpeed Cache on a LiteSpeed server, use its built-in purge tools.
- WooCommerce or Magento: use the cache controls documented for your platform and installed caching extensions; menu locations vary.
- Laravel: if you have SSH, select the commands appropriate to your deployed application, such as
php artisan cache:clear,php artisan config:clear,php artisan view:clear. Follow your version-specific deployment instructions, including any required cache rebuilding, rather than running every command indiscriminately.
After purging caches, re-check inode usage in cPanel once its statistics refresh. The reduction depends on how many cache files were removed, and caches may rebuild as visitors use the site.
If your site is cache-heavy or uses page builders, consider reading our guide on hosting performance for Elementor, Divi and other page builders; good caching strategy is part performance, part resource management, including inode usage.
Step 3: Remove obsolete local backups and backup copies
Next, look for leftover backup archives:
- Search for files with names like
*backup*,*old*,*-copy*,.zip,.tar.gz,.sql. - Check typical plugin backup directories (e.g.,
wp-content/updraft/,wp-content/backups/). - Look at root-level directories like
backup/,OLD_SITE/,site-2021/.
Rules of thumb:
- Keep only the recent local backups your recovery plan requires (for example, 1–3), stored outside your web root. Moving them within the same account does not reduce its inode usage.
- Delete obsolete copies only after verifying that the backups you retain can be restored and meet your retention needs.
- For long-term archives, transfer them to your local machine or off-site storage and verify the transfer before removing the hosting copy.
Some backup plugins store data as many small chunks. Removing obsolete backup sets can reduce inode usage, but use the backup tool’s retention or deletion controls rather than deleting individual chunks that retained backups may still need.
Step 4: Archive or delete abandoned test sites
If you have multiple test/staging copies inside the same account:
- List all subdirectories under your home or
public_html(e.g.,test/,old/,backup-2020/). - Check each candidate site’s owner, domain mapping, scheduled jobs and dependencies to confirm it is no longer needed; visiting its URL alone cannot establish this.
- For sites you no longer need, back up the files and any required databases, verify the downloaded backup, then delete only the confirmed site directory—not an account or system directory.
If you want to keep them for reference but not as live code, consider compressing them into .zip or .tar.gz archives. A single archive file normally uses one inode, regardless of how many files it contains. Creating it does not free the source files’ inodes: verify the archive before removing the original directory. Allow enough free disk space and inode headroom for archive creation and any temporary files. If local headroom is insufficient, use the off-account backup approach from Step 1. Keep retained archives outside the web root or off-site.
Step 5: Tidy up logs and debugging leftovers
Search for large or numerous log files in your account. Large files consume disk space, but inode usage depends on file count, not file size:
- Common names:
error_log,debug.log,laravel.log,system.log,exception.log. - Check directories like
wp-content/,storage/logs/, and root-level log files.
After identifying which logs are active and which must be retained, you can:
- Download logs needed for analysis or retention and verify the copy before deleting them
- Delete only obsolete, inactive log files. For a log still being written, use supported rotation controls or ask the host; deleting an open log may not free its inode or disk space until the writer closes it.
- Disable verbose debugging modes in
wp-config.phpor app config files if they are no longer needed
On VPS servers we recommend proper log rotation with logrotate; we even have a full article on VPS disk usage and logrotate to prevent disk errors. On shared hosting you won’t have full control, but you can still manage logs under your own directories.
Step 6: Clean email folders and set retention policies
Email often remains invisible until you inspect the mail/ directory in File Manager or cPanel’s Email Disk Usage tool. To reduce inode usage from mail, use webmail, an email client or the panel’s mail-cleanup tools rather than deleting mailbox files directly. Apply retention requirements before removing messages:
- Ask mailbox users to empty large
Trash,SpamandJunkfolders. - Delete very old messages from
Sentand large custom folders. - Configure automatic cleanup in email clients (e.g., delete Trash older than X days).
- For long-term archiving, copy old mail to a local archive or dedicated email archiving system, verify that it is readable and backed up, then remove the server copies permitted by your retention policy.
Our guide on email archiving and legal retention on cPanel and VPS explains how to design sustainable e‑mail storage so that your main hosting account doesn’t become a permanent archive for everything.
Step 7: Remove unused themes, plugins and modules
Each plugin, theme or module is typically a folder with dozens or hundreds of files. On WordPress and other CMSs:
- Delete themes you no longer need, but retain any parent theme required by the active theme and any maintained fallback theme you intend to keep.
- Remove deactivated plugins that you don’t plan to use again.
- In other platforms, remove unused extensions or modules from their admin panels.
This not only reduces inode count but also shrinks your attack surface. We discuss this in more depth in our article on WordPress security on shared hosting, where unused plugins and themes are a common security weakness.
Prevent Hitting Inode Limits Again: Ongoing Hygiene
Once you’ve done a first deep cleanup and brought inode usage down, the next step is to stop it from climbing back up quickly. A bit of regular hygiene goes a long way.
Schedule a simple quarterly cleanup routine
Use a quarterly review as a starting point, not a guaranteed safe interval. Monitor more often if file counts grow quickly or headroom is low. Repeat a quick version of the steps above, retaining their backup and deletion safeguards:
- Check inode usage in your control panel and note the trend.
- Clear caches via admin tools.
- Delete old backups and logs.
- Review email usage and clean large folders.
Set a calendar reminder so this becomes routine, not a crisis response when inode usage reaches your plan’s limit.
Configure backups for low inode impact
Instead of keeping many backup copies inside your shared hosting account, aim for:
- Only the recent local backups your recovery plan requires (for example, 1–3), rotated regularly and kept outside the web root.
- Primary long-term backups stored off-site (object storage, another server, or your own device), with readability and recovery checks.
Where your application and hosting plan support it, offloading backups and media files to object storage can reduce local storage needs and serving I/O. Inode savings depend on how many local files are removed, not their size; uploading copies while retaining the originals does not free local inodes. Before removing local media, verify the transfer, media links and the application’s need for local files, then use the offload tool’s supported removal method. Verify backup readability and recovery requirements before removing local backup copies. If you’re curious about that approach, see our article on offloading WordPress and e‑commerce media to S3/MinIO-compatible object storage.
Keep an eye on plugins and extensions
Before installing a new plugin or extension, ask:
- Does it create its own cache or log directory?
- Can you configure retention or auto-clean features?
- Is it actively maintained and efficient, or does it tend to leave junk files behind?
Choosing well-maintained plugins and configuring their cache and log retention can help limit inode growth. Keep a reviewed set of necessary plugins so their file-generation and cleanup behavior remains manageable.
Educate mailbox users about storage habits
If your team uses the same shared hosting account for email, brief them on simple habits:
- Regularly empty Trash and Spam when retention requirements permit.
- Plan which messages must remain in live IMAP mailboxes and which can be archived.
- For long-term retention, use a local or dedicated archive that meets your access, backup and retention needs; verify it before removing server copies.
This may sound like a small thing, but over a few years it can be the difference between a clean account and one that regularly bumps into inode ceilings.
Monitor other resource limits too
Monitor CPU, RAM and I/O limits separately from inode usage. A high file count alone does not show whether PHP or MySQL is overloaded at peak times. We have a separate article on avoiding the “Resource Limit Reached” error on shared hosting, which pairs nicely with this inode-focused guide.
Even with careful cleanup, some projects simply outgrow shared hosting. Typical signs include:
- You hit inode limits every few months despite regular hygiene.
- You host many websites (agency, freelancer, or multi‑project account) on one shared plan.
- Your application generates lots of logs, cache files or uploads by design (e.g., big WooCommerce store, LMS, media-heavy site).
In these cases, a VPS or dedicated server may offer more storage-management flexibility, depending on the plan, administrative access and filesystem. When comparing options, look for the ability to:
- Plan disk capacity and inode capacity for your workload.
- Use advanced tools like
logrotate, Redis/Memcached, and external object storage. - Separate high-churn data (logs, cache, sessions) from your main web root.
If you are worried about downtime during migration, our guide on moving from shared hosting to a VPS without downtime walks through a calm, step‑by‑step plan: staging, DNS changes, and cutover strategies.
One possible approach is a hybrid: keep small, low‑traffic sites on shared hosting, and place busy, file-heavy or mission-critical projects on a managed VPS or dedicated server.
Wrapping Up: Make Inode Management a Routine, Not a Crisis
Inode limits matter alongside disk space and bandwidth because file count can prevent new file creation even when storage space remains. Start by checking your account’s usage and quota scope, then identify where files accumulate: caches, unpacked backups, mail, logs and old site copies. A careful initial cleanup, followed by a quarterly review and more frequent monitoring when growth or limited headroom warrants it, can reduce the risk of inode-related failures during updates or busy seasons. Focus on removing confirmed unnecessary files, not simply the largest ones.
If you regularly hit inode ceilings even after cleanup, review both file-generation behavior and whether your plan fits the workload. Before moving your busiest sites to a VPS or dedicated server, verify that the arrangement provides suitable inode and disk capacity and the control you need over storage, logs, caching and backups. Whether you stay on shared hosting or plan a gradual upgrade, treating inode management as part of normal maintenance—alongside backups and updates—can help reduce troubleshooting time, support tickets and the risk of inode-related downtime.





