100% Disk Usage! How I Saved My WordPress Server from Repeated Crashes on AWS


Hook: The Night My Server Gave Up

I’ll never forget the sinking feeling of seeing my WordPress sites suddenly go offline—again. Visitors were met with blank pages or error messages. Uptime monitoring tools started firing alerts in the middle of the night. My stress level skyrocketed. The culprit? Repeated server crashes on AWS, all because of a single issue: 100% disk usage.

If you’re running a WordPress site (or multiple) on an AWS EC2 instance and notice random downtime, slow performance, or strange errors, you might be on the same path I was. But the good news? You can fix it—and prevent it for good. Here’s my real-world troubleshooting journey.


What “100% Disk Usage” on AWS EC2 Means (and How to Spot It)

When your Linux server hits 100% disk usage, every service—from Nginx/Apache to MySQL and PHP—starts failing. You might see:

Key tools I used to spot the issue:

Pro tip: If you can SSH in and run df -h, and see / or /dev/xvda1 at 100%, you’ve found the problem!


Digging Deeper: Discovering the Real Root Cause

For me, the story didn’t end at “disk full.” I needed to know why. Here’s what I discovered:

Lesson: On a multi-site server, even a few gigabytes of backups or logs can push you to 100% disk usage fast.


The Fix: How I Freed Up Space and Stopped the Crashes

1. Identify the Disk Hogs

SSH into your instance and find out what’s eating space:

df -h
sudo du -h --max-depth=1 / | sort -hr | head -20
sudo du -h --max-depth=1 /var/www | sort -hr | head -20

2. Remove Unused Backups, Logs, and Cache

Clean up big offenders. For me, these commands worked wonders:

sudo rm -rf /var/www/temp/*
sudo rm -rf /var/log/*.gz
sudo rm -rf /var/log/*.1
sudo journalctl --vacuum-time=3d
sudo rm -rf /tmp/*

3. Confirm Free Space

Always double-check after cleanup:

df -h

Disk usage dropped from 100% to 72% instantly—and the server was back online.

4. Restart Services If Needed

Sometimes Apache, Nginx, or MySQL need a restart to recover:

sudo systemctl restart nginx
sudo systemctl restart apache2   # (if using Apache)
sudo systemctl restart mysql

5. Set Up Automated Backups and Cleanup


How to Prevent 100% Disk Usage on AWS WordPress Servers

If you’re running WordPress (or any web app) on AWS EC2, here’s what I recommend:

  1. Monitor Everything:

    Set up CloudWatch to alert you when disk usage hits 75%, 85%, and 95%.

  2. Automate Backups—But Rotate Them:

    Use AWS Lifecycle Manager for EBS snapshots and set a retention policy. Offload WordPress/database backups to S3 instead of storing locally.

  3. Automate Cleanup:

    Use cron jobs or scripts to regularly clear temp, cache, and log files.

  4. Scale If Needed:

    If your sites keep outgrowing disk, consider a larger EBS volume or splitting backups/media onto S3.

  5. Review Plugins and Cache:

    Badly configured backup or cache plugins can fill disks quickly.


Conclusion: From Chaos to Control

Hitting 100% disk usage on AWS can be a nightmare, but it doesn’t have to take down your business. With a few smart checks, cleanups, and some automation, you can go from constant crashes to total confidence. My WordPress blogs are now stable, backed up, and I sleep better at night knowing AWS has my back.

Have you faced server disk issues or want to share your own fix? Drop a comment or question below—let’s help each other keep our sites online!