Depending on the current load, Amazon EC2 may spawn multiple server instances of a well visited WordPress website (files are duplicated, while database is the same for all). For this WordPress website I want to enable static page caching.

The problem obviously is that almost every caching plugins store the cached within the server instance. If there are multiple instances the cache folder can not be shared on Amazon EC2 (https://serverfault.com/questions/646293/shared-file-systems-between-multiple-aws-ec2-instances).

Does anybody have experience with this topic? Is there a possibility to do static file caching within the database? Or how do you scale WordPress to multiple instances and solve the caching problem? I have looked for Plugins to solve this but no result :-/

2 Answers 2


There are two alternatives

  1. store the caching on an NFS "drive"
  2. put a caching proxy before your instances and forget about stupid caching plugins.

Variation on 2 is to use a CDN like cloudflair to do the caching.

  • Thanks. NFS drive for cache folder sounds like a good idea! With Cloudflare etc. we had problems as the caching cannot be controlled very well. I have implemented my own solution I will post it here later.
    – Blackbam
    Commented Jan 31, 2018 at 9:44

I have noticed that on WP Super Cache, with Redis Object Cache enabled, the experimental feature "Object Cache" (instead of file caching) is available.

I tested it but the timestamp checks failed, don't know if they are supposed to (it happens also when CloudFlare is enabled with HTML minification and is considered normal).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.