W3 Total Cache 500 Internal Server Error

WordPress
Caching
Debugging
Archive
When activating browser caching triggers a 500 error — it’s probably your virtual hosts config.
Author

B. Talvinder

Published

March 4, 2015

From the Archive

Originally published in 2015 on talvinder.com. Some technical details may be outdated, but this remains here as part of the archive.

W3 Total Cache is a very powerful plugin and if handled properly, can improve WordPress performance a lot. But at times it can lead to migraines of the worst order. One such scenario is when you activate browser caching and suddenly get pretty 500 errors.

If you just activated page caching and browser caching and got a 500 internal server error, here’s a possible solution:

  1. Check your apache error logs
  2. Most likely the latest error will be related to .htaccess, something like “ExpiresActive not allowed here”
  3. This is caused by incompatible virtual hosts settings
  4. Go to your virtual host settings and add AllowOverride Indexes to the relevant code block

For me it was:

<Directory /var/www/vhosts/domain.com>
  Options FollowSymLinks
  AllowOverride FileInfo Options Indexes
  Order allow,deny
  Allow from all
</Directory>

I added Indexes to AllowOverride. The order doesn’t matter.

And the issue was fixed.

Enjoyed this?

Get frameworks, build logs, and field notes in your inbox.

No spam. Unsubscribe anytime.