Welcome to Sydney Business Web Technical Solutions Problem 5 - WordPress 404 After Disk Full

Welcome to Sydney Business Web Technical Solutions Problem 5 - WordPress 404 after Disk Full

Every day, we solve problems for eCommerce website owners. We had a think about how we might use this activity to help others, and came up with this idea: Every week or three, we'll take the trickiest problem and publish our solution. 

Important! - Some of these solututions involve adding code to your website (WordPress and Woocommerce mostly), so please ALWAYS be careful. We are not in any way responsible, directly or indirectly for any impact or consequences our code or advice has on your website, nor are we liable for any damage arising from such use.

Always back up your website before changing or adding code and/or editing the database, This is critically important!!!

PROBLEM 5: Disk Full followed by 404 on All PAges  Except Home Page

Wordpress 404  after disk full

Fixing WordPress 404 After Disk Full (WooCommerce + Thrive)

Keyword: WordPress 404 after disk full

When a server runs out of disk, writes can fail and your .htaccess (WordPress rewrites) may get truncated. Symptom: homepage works, every other URL 404s. Here’s the shortest safe recovery for WooCommerce + Thrive Themes.

1) Resave Permalinks (Regenerate Rewrites)

  1. WP Admin → Settings → Permalinks → click Save (no changes).
  2. If still 404, restore a minimal root .htaccess:
# WordPress baseline
Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Docs: WordPress uses .htaccess for pretty permalinks (WP Dev: Apache/.htaccess), Apache URL rewriting via mod_rewrite (Apache mod_rewrite).

2) Silence /.well-known/ Errors Without Breaking ACME

If logs show AH01276 “Cannot serve directory … /.well-known/”: create the folder and block listing, but allow ACME challenges:

public_html/.well-known/index.html  (empty file)

public_html/.well-known/.htaccess
RewriteEngine On
RewriteRule ^acme-challenge/ - [L]
Require all denied

Why: Apache won’t list a directory without a matching DirectoryIndex (autoindex behaviour), so adding an index stops noise, and the rule preserves Let’s Encrypt HTTP-01 challenge (Let’s Encrypt: challenge types). The error pattern you saw is the classic “No matching DirectoryIndex” from Apache’s autoindex module (Apache mod_autoindex).

3) After a Disk-Full: Quick Hygiene

  • Restart PHP-FPM / clear OPcache in WHM/cPanel.
  • Purge caches: Thrive page cache + any page/object cache.
  • WooCommerce logs: rotate/relocate old files (they live under wp-content/uploads/wc-logs/) and review via WooCommerce → Status → Logs. Docs: WooCommerce logging.

4) Nginx/Proxy Note (If Used)

Ensure rewrites reach Apache. If Nginx fronts Apache, confirm the WordPress location rules or temporarily disable Nginx URL routing so .htaccess is respected (Apache mod_rewrite).

5) Minimal .htaccess Is Enough

For root installs that baseline is all WordPress actually needs for pretty permalinks; extra noise usually adds risk without benefit. References: WP Dev: Apache/.htaccess, Apache mod_rewrite.

Troubleshooting Checklist (60 seconds)

  1. Resave permalinks → test a deep URL.
  2. Drop in the baseline .htaccess (above) with 644 perms; folders 755.
  3. Restart PHP-FPM; clear caches.
  4. Check Site Address/WordPress Address in Settings → General.
  5. Ensure index.php exists in webroot.

References

Need help? If your rewrites still fail after this checklist, it’s usually an upstream proxy or a mangled .htaccess. We can audit your vhost and proxy rules fast.

Results

Our problem was that a client website expanded to 17GB  from 12GB - much more than planned and more than  allocated - 15GB!  The site owner reported issues with the site to us and we immediately increased disk space to 20GB. Then we found that we could not access any page or product - everything gave a 404!  This was deeply alarming, but in the end all we had to do to restore operation was to re-save the permalinks.

Need help? - 

CONTACT SYDNEY BUSINESS WEB NOW!

Call Us
Email us