When logging in to cPanel or performing file operations, you may encounter the following error:
Write failed: Disk quota exceeded (122)
This means your hosting account has used 100% of its allocated disk space and the server can no longer write new data.
Symptoms
- cPanel displays the "Disk quota exceeded" error on login or during file operations
- Unable to upload files via File Manager or FTP
- Website errors (pages not loading, broken uploads, database write failures)
- Unable to send or receive emails (mailbox full)
- WordPress or CMS admin panel showing write errors
- Backups failing to complete
Causes
Your hosting disk quota has been fully consumed. Common causes include:
- Old backups — cPanel or plugin-generated backups stored in your account
- Large email mailboxes — Emails with heavy attachments accumulating over time
- Error logs — Oversized log files from PHP errors or access logs
- Unused files — Old website versions, unused themes, plugins, or uploads
- Database bloat — Large, unoptimised databases with excessive post revisions, spam comments, or log tables
- Trash and spam folders — Deleted files and spam emails still occupying space
Solution
Step 1: Log in to cPanel
If cPanel shows the error on login, try refreshing the page — it often loads on the second attempt. Alternatively, log in via the Cynet client area (which bypasses the direct login).
Step 2: Check Disk Usage
Go to cPanel → Disk Usage (under the Files section). This tool shows:
- Your total disk quota and current usage
- A breakdown of space usage by directory
- The largest folders on your account
Step 3: Free Up Disk Space
Work through these common areas, starting with the biggest offenders:
Delete Old Backups
Backups are often the largest space consumers:
- Go to cPanel → File Manager
- Check the home directory (
/home/username/) for files like:
backup-.tar.gz - cpmove-.tar.gz - Files ending in .sql.gz or .zip that are old database/site backups
- Also check
/publichtml/for backup files left by plugins (e.g.,wp-content/updraft/,wp-content/ai1wm-backups/) - Download any backups you want to keep to your local computer, then delete them from the server
Clear Email Mailboxes
- Go to cPanel → Email Accounts
- Check the disk usage column for each account
- For large mailboxes:
Delete Error Logs
- In File Manager, navigate to your home directory
- Look for large log files:
errorlog (in /publichtml/ or subdirectories) - access-logs/ directory
- Delete or truncate oversized log files
- Fix the underlying errors causing the logs to grow (check your website's PHP code)
Remove Unused Files
- In File Manager →
/publichtml/:
/wp-content/cache/ folder if using a caching plugin
- Delete any test files, temporary uploads, or development files you no longer need
Optimise Databases
- Go to cPanel → phpMyAdmin
- Select your database
- Click Check All → choose Optimize table from the dropdown
- For WordPress specifically:
wp-config.php: define('WPPOSTREVISIONS', 5); - Use a plugin like WP-Optimize to clean up database overhead
Step 4: Verify the Fix
After freeing up space:
- Go to cPanel → Disk Usage and confirm usage is below your quota
- Refresh cPanel — the error message should be gone
- Test your website to confirm it's working normally
Prevention
- Schedule regular clean-ups — Review disk usage monthly and delete old files
- Configure backup retention — If using a backup plugin, set it to keep only 2–3 recent backups and delete older ones automatically
- Monitor mailbox sizes — Encourage email users to archive old messages locally and empty Trash regularly
- Fix PHP errors — Resolve coding issues that generate large error logs
- Consider upgrading — If you consistently run low on disk space, upgrade to a higher hosting plan with more storage via the Cynet client area