There was a problem loading the comments.

How to Check Which Files and Folders Are Using the Most Disk Space

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Overview

If you've received a disk space warning, are approaching your plan's storage limit, or want to understand what's consuming space on your hosting account, the built-in tools in cPanel and DirectAdmin make it easy to see exactly where your disk space is going — no support ticket required.

This guide walks you through using these tools to find the biggest files and folders on your account so you can take action.


Why This Matters

Disk space on your hosting account is used by more than just your website files. Common culprits for unexpected usage include:

  • Email accounts and their stored messages
  • Database backups (both manual and plugin-generated)
  • Cached files from caching plugins
  • Log files that grow over time
  • Old website backups left in place after migrations
  • Staging copies of sites
  • Unused media uploads in WordPress

Finding and cleaning these up is almost always faster than upgrading to a larger plan.


Using the Disk Usage Tool in cPanel

cPanel includes a dedicated Disk Usage tool that shows a breakdown of where your space is going.

Step-by-Step

  1. Log in to cPanel.
  2. In the search bar at the top, type Disk Usage and click the result.
  3. You'll see a summary at the top showing total disk usage and your account's quota.
  4. Below that is a table listing the top-level directories in your account with their sizes.

Understanding the Display

The tool offers two views:

  • Directory tree view — Shows folders in a nested structure. Click the arrow next to any folder to expand it and see subfolders.
  • "Display the contents of subdirectories in a graphical format" checkbox — When enabled, shows a visual bar chart for each folder, making it easier to spot the biggest space users at a glance.

Key Directories to Check

  • /home/username/ — Your entire account. The total here matches your quota usage.
  • /home/username/public_html/ — Your main website files. Usually one of the largest folders.
  • /home/username/mail/ — All email storage. Can grow unexpectedly large if you don't delete old emails.
  • /home/username/logs/ — Raw access and error logs. Usually small but can accumulate.
  • /home/username/backups/ or backup-* folders — Manual or cron-generated backups. Often the biggest space hogs.
  • /home/username/tmp/ — Temporary files including PHP sessions. Usually cleaned automatically but can bloat.
  • /home/username/.trash/ — Deleted files. Empty this to recover space.

Common Large Folders Inside public_html

Once you identify public_html as the issue, drill deeper:

  • public_html/wp-content/uploads/ — WordPress media library. Can be huge if you've been uploading large images or videos.
  • public_html/wp-content/cache/ — Cache files from plugins like W3 Total Cache or WP Super Cache.
  • public_html/wp-content/backup* — Backup plugins (UpdraftPlus, BackWPup, etc.) often store backups here.
  • public_html/wp-content/plugins/ — All installed plugins. Deleting unused ones helps.
  • public_html/wp-content/debug.log — If WordPress debug logging was left on, this file can grow to several GB.

Using Disk Usage Tools in DirectAdmin

DirectAdmin has similar but slightly less visual tools for disk space analysis.

Step-by-Step

  1. Log in to DirectAdmin.
  2. On the main dashboard, look for Disk Usage or System Info & Files → Disk Usage (location varies by skin).
  3. You'll see a summary of total usage, quota, and a breakdown by major category (files, email, databases).

Per-Domain Disk Usage

  1. Go to Domain Setup or Account Manager → Domain Setup.
  2. Click your domain.
  3. The page shows disk usage specific to that domain, including email and web files.

Using File Manager to Investigate

DirectAdmin's File Manager doesn't show folder sizes as clearly as cPanel's, but you can still navigate through folders:

  1. Open File Manager.
  2. Browse to your site's root (domains/yourdomain.com/public_html/).
  3. File sizes are shown next to each file. Folders don't show a cumulative size, so you'll need to drill in to find large items.

For a better view of folder sizes in DirectAdmin, SSH access (if your plan includes it) with the du command gives a complete picture — see the advanced section below.


Using File Manager to Find Large Files

Both cPanel and DirectAdmin File Managers let you sort by file size, which is useful for spotting individual huge files.

  1. Open File Manager in your control panel.
  2. Navigate to the folder you want to inspect.
  3. Click the Size column header to sort files by size (largest first).
  4. Look for anything unexpectedly large — common finds include:
    • error_log or debug.log files (often hundreds of MB to several GB)
    • .sql files from old database exports
    • .zip or .tar.gz files from migrations
    • Video files uploaded to WordPress
    • Old staging site folders (staging/, dev/, old/, backup/)

Checking Email Storage

Email accounts are a frequent cause of unexpected disk usage.

In cPanel

  1. Go to Email Accounts.
  2. Each account's disk usage is shown in the list.
  3. Click Manage next to any account to see quota and usage details.

Also check:

  • Email Disk Usage tool (search for it in cPanel) — shows a per-account breakdown with options to delete old messages by date.

In DirectAdmin

  1. Go to Email Manager → Email Accounts.
  2. Each account shows its current usage and quota.

Common Email Space Issues

  • IMAP folders retaining old messages — Users often don't realise "deleting" in some mail clients just moves messages to Trash, which still consumes space.
  • Sent folder bloat — Rarely cleaned, often the largest folder.
  • Shared mailboxes — If multiple people check the same account, deleted messages may be retained.
  • Spam/Junk folders — Can accumulate thousands of messages.

Checking Database Sizes

Databases count toward your disk quota too.

In cPanel

  1. Search for MySQL Databases.
  2. Each database is listed with its size.
  3. Look for databases that are much larger than expected — this often indicates bloated log tables, transient data in WordPress, or uncleared plugin data.

In DirectAdmin

  1. Go to Account Manager → MySQL Management (or similar).
  2. Database sizes are listed alongside each database.

Common Database Bloat Sources (WordPress)

  • wp_options table with thousands of expired transients
  • wp_postmeta with orphaned meta entries
  • Plugins like Wordfence or security plugins storing years of logs
  • WooCommerce order notes or session data
  • Revisions — every edit of a post or page stores a full copy

Plugins like WP-Optimize can clean these up safely.


Advanced: Using SSH (If Available)

If your plan includes SSH access, these commands give you a complete picture:

Find the Biggest Top-Level Folders

 
 
du -h --max-depth=1 ~ | sort -hr

Run from your home directory. Shows each top-level folder with its cumulative size, sorted largest first.

Find the Biggest Folders Inside public_html

 
 
du -h --max-depth=2 ~/public_html | sort -hr | head -20

Find Individual Files Over 100MB

 
 
find ~ -type f -size +100M -exec ls -lh {} \;

Find and Display the Top 20 Biggest Files

 
 
find ~ -type f -printf '%s %p\n' | sort -nr | head -20 | awk '{ printf "%.2f MB %s\n", $1/1024/1024, $2 }'

What to Do Once You've Found the Culprits

Safe to Delete

  • Old backup files (.zip, .tar.gz, .sql) that you've downloaded locally or no longer need.
  • Cache folders (wp-content/cache/) — Caching plugins will regenerate these.
  • Large error_log or debug.log files — Once you've reviewed them for issues.
  • Email in Spam and Trash folders — These are almost never needed.
  • Staging or dev folders you no longer use.

Delete Carefully

  • Plugin folders — Deactivate in wp-admin first, then delete. Don't delete a plugin's folder while it's active.
  • Old WordPress installations in subfolders — Only after confirming they're truly unused.
  • Database tables — Use phpMyAdmin; back up first.

Never Delete

  • Anything in wp-includes/ or wp-admin/.
  • wp-config.php or .htaccess.
  • Your main database (unless you're certain it's an old copy).
  • Email accounts with unknown contents — confirm with the user first.

Preventing Future Disk Bloat

  • Set up automatic cache purging in your caching plugin.
  • Use a backup plugin that stores backups off-server (to Dropbox, Google Drive, S3, etc.) instead of in wp-content/.
  • Set a mailbox quota per email account so one account can't fill your entire plan.
  • Run WP-Optimize or similar monthly to clean up database bloat.
  • Review and delete old files quarterly — especially in public_html/ and your home directory.
  • Turn WordPress debug logging off once you're done troubleshooting.

When to Contact Support

The steps above handle the vast majority of disk space issues. Open a ticket if:

  • Your disk usage doesn't match what you can find in the file manager and control panel tools (e.g., cPanel says you're using 40GB but you can only account for 15GB).
  • You've identified the files but don't have permission to delete them.
  • You need help understanding what a specific large file is before deleting it.
  • You've cleaned up significantly but your usage hasn't decreased — sometimes quota recalculation needs a manual refresh.

When opening a ticket, please include:

  • Your current disk usage as shown in cPanel/DirectAdmin.
  • Which folders or files you've already identified and cleaned.
  • What you'd like help with specifically.

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

© LaunchCDN