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.
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:
- Check your apache error logs
- Most likely the latest error will be related to
.htaccess, something like “ExpiresActive not allowed here” - This is caused by incompatible virtual hosts settings
- Go to your virtual host settings and add
AllowOverride Indexesto 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.