Jignesh M. Mehta
Jignesh M. Mehta

Reputation: 914

How to cache php / static page in Amazon S3 bucket?

I have installed one WordPress site on my ec2 instance and already store and access all the images on Amazon S3 Bucket with the offload S3 plugin. I want to make page cache of all the PHP page. Is it any mechanism or plugin available for this?

I have referred this document for reference.

Upvotes: 0

Views: 354

Answers (1)

chris
chris

Reputation: 37480

Since wordpress uses PHP to generate pages, you can't use S3 to cache them.

However, you have a couple of options if the goal is to speed up your site.

Option 1 is to use CloudFront, a CDN, in front of your site. This would require you to cache the generated pages for a certain timeframe, which means if you do update content, it will not show up for your end users immediately unless you invalidate the cloudfront cache.

Option 2 is to export the entire site to static pages, and serve those out of S3. The benefit of this is that it will be much cheaper to host your site; the downside is that you will have to refresh the S3 content every time you make a change.

Upvotes: 1

Related Questions