Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Free Hosting Storage Safely: Cleanup Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Running low on web hosting storage can slow your site or stop uploads entirely. This guide walks you through a safe cleanup that removes only what’s truly unnecessary—logs, cache, old backups, and orphaned files—without touching anything your site needs. You’ll need your hosting control panel login (cPanel, Plesk, or a custom dashboard) and an FTP client or file manager.

What You'll Need

  • Hosting control panel credentials (cPanel, Plesk, etc.)
  • FTP client (FileZilla, Cyberduck) or the host’s file manager
  • A backup of your site (or a fresh one before you start)
  • Access to phpMyAdmin or a database management tool

Step-by-Step

  1. Check your current usage. Log into your hosting panel and look for “Disk Usage” or “Storage.” Note which folders are largest—usually public_html, logs, backups, or tmp.
  2. Make a fresh backup. Even if you’re only deleting junk, a backup protects you from accidental deletions. Use your panel’s backup tool or download a full site copy via FTP.
  3. Clear old backups. Hosts often keep automatic backups for weeks. In cPanel, go to “Backup” or “Backup Wizard” and delete backups older than your retention policy (e.g., keep only the last 2–3). Each backup can be hundreds of MB.
  4. Delete cache files. Many CMSs (WordPress, Joomla) and plugins create cache folders. Use the plugin’s own “Clear Cache” button first, then manually remove leftover files in wp-content/cache or similar. Do not delete the folder itself if the CMS expects it—just empty it.
  5. Remove old logs. Check logs or access-logs folders. Keep the most recent 1–2 weeks; delete older .log files. If your site generates huge logs, consider enabling log rotation in your panel.
  6. Clean temporary files. Look in /tmp or public_html/tmp for files older than a few days. These are often leftover from installers, uploads, or sessions. Delete only files you recognize; if unsure, leave them.
  7. Remove orphaned media and uploads. In your CMS, use a plugin or script to find images/files that aren’t referenced in any post or page. Delete them from the media library and then from the server via FTP.
  8. Optimize databases. Log into phpMyAdmin, select your site’s database, and run “Optimize Table” on all tables. This reclaims space from deleted rows. Also delete old revisions (e.g., WordPress post revisions) using a plugin or SQL query.
  9. Check for duplicate or large files. Use your file manager’s “Size” column to sort by size. Look for files over 50 MB that you don’t recognize—often leftover installers, archives, or old exports.
  10. Empty trash and recycle bins. In cPanel, the “Trash” folder may hold deleted files. Empty it via the file manager.
  11. Verify your site still works. After cleanup, load your homepage, a few key pages, and log into your admin area. Check that images and uploads display correctly.

Common Mistakes

  • Deleting the wrong folder. For example, removing wp-content breaks your WordPress install. Always double-check the path before deleting.
  • Deleting active cache. If you clear cache while your site is live, performance may temporarily drop. Do it during low traffic.
  • Ignoring database bloat. Many users only delete files, but databases can hold hundreds of MB of revisions and spam comments.
  • Deleting .htaccess or other hidden files. These control security and redirects. Never delete files starting with a dot unless you know exactly what they do.
  • Not making a backup. Even a “safe” cleanup can go wrong. Always have a recent backup.

Tips

  • Use a plugin like WP-Optimize for WordPress to clean database tables and cache in one go.
  • Set up automatic log rotation in your hosting panel to keep logs small.
  • Move large media files (videos, PDFs) to a CDN or external storage like Amazon S3.
  • Schedule a monthly cleanup reminder. Storage fills up faster than you think.
  • If your host offers “staging” environments, clean those too—they can eat space.

Troubleshooting

  • Site shows errors after cleanup. Restore the deleted file from your backup. If you don’t have a backup, check your host’s “Trash” or “Recycle Bin.”
  • Storage still full. Re-check your usage. Some hosts have hidden folders like mail or etc that can be large. Contact support if you can’t find the culprit.
  • Cannot delete a file. The file may be locked by a running process. Wait a few minutes and try again, or restart your site via the panel.
  • Database optimization takes too long. Run it during off-peak hours. If it times out, try optimizing tables one by one.
  • Accidentally deleted a core file. Reinstall the CMS core (e.g., WordPress) via the panel’s “Reinstall” feature—this restores missing files without touching your content.

Frequently Asked Questions

How much storage should I keep free?

At least 10–20% of your total allocation to allow for logs, backups, and temporary files. If you’re constantly at 95%, consider upgrading or offloading media.

Is it safe to delete all cache files?

Yes, cache files are regenerated automatically. However, deleting the cache folder itself may cause errors if the CMS expects it to exist. Empty the contents, not the folder.

Can I delete old email backups from my hosting account?

If you don’t need them, yes. But if you have business emails, keep at least one backup offsite before deleting.

Why does my storage usage not decrease after deleting files?

Your hosting panel may update usage only once a day. Wait 24 hours and re-check. Also, check if you have a “trash” folder that needs emptying.

Do I need to optimize my database regularly?

It’s good practice monthly, especially for WordPress sites with frequent edits. It prevents bloat and keeps queries fast.

What if I accidentally delete a critical file?

Restore from your backup immediately. If you don’t have one, contact your host’s support—they may have a recent snapshot.