Is it possible to completely host WordPress on AWS with EC2, S3 and CloudFront Dynamic Content Origins, in the way that WordPress is currently built / architected?

Further Details:

I would like to install my WordPress on an EC2 instance.

Store all my assets: images, videos and download etc on S3

And use CloudFront Dynamic Content Origins serve the pages and posts from the WordPress website.

Therefore making is very quick for page load and only needing a very small EC2 instance, because all content is cached in CloudFront.

Read more

N.B. CloudFront does not support POST HTTP method


  • Please do not suggest plugins that only stores assets on S3
  • Please do not suggest that I rewriting WordPress to make this work
  • We have AWS support and they confirmed that POST is not supported.
    – Robs
    Mar 26 '13 at 20:08


Cloudfront is just a caching proxy to your content not different from any other cache on the internet. AFAICT If you set up your cache headers properly it will cache automatically your content.

The difficult part in caching is to know what not to cache and to invalidate the cache when there was a change. You can look at how the caching plugins (super-cache and w3tc) work and try to use similar settings for cloud front.

  • But adding comments require doing a POST don't they? and CloudFront does not support POST so they will get a 403 http status response.
    – Robs
    Mar 24 '13 at 13:15
  • I have only skimmed the cloudfront spec so there might be some incomplete understanding, but basically caching proxies just let a POST pass without serving anything from the cache. Mar 25 '13 at 15:31
  • This thread last updated on March 5th seems to give the impression it does not: forums.aws.amazon.com/thread.jspa?threadID=94389
    – Robs
    Mar 26 '13 at 16:05
  • In that case it is not very practical when you use comments. I think that you can put the comment form in an iframe to try to get around it, but not sure that it is worth it. As I tried to imply in my answer, caching is tricky for dynamic sites (what happens if you use an RSS widget, when will it get updated?) and for static sites the question of POST is usually irrelevant. Mar 26 '13 at 19:01
  • I opened a support ticket with AWS and they confirmed that POST is not supported with CloudFront at this time.
    – Robs
    Mar 26 '13 at 20:09

It's possible to complete host your site with AWS. And there is a beautiful + functional plugin which can deal with both of your requirements, i.e integration with S3 + CF

Amazon S3 for WordPress with CloudFront

Uploads your wordpress attachements to S3 with an option CloudFront distribution

  • I'm sorry my question was not clear enough I will edit.
    – Robs
    Mar 23 '13 at 12:18
  • And the suggested plugin is not compatible with the latest version of WordPress 3.5.1
    – Robs
    Mar 23 '13 at 13:38
  • of course it's compatible. just because it says that it's compatible upto 3.2.1 doesn't mean it's not compatible with any higher version. rather sometime it means that author didn't update the codebase because it works by default. See the bottom where people votes for the compatibility. I tested it with 3.5.1 myself it's working Mar 23 '13 at 14:02
  • I stand corrected, it is compatible. It did not appear in my list of plugins, I assumed this was why. Must be that the server I host on is slow. sorry.
    – Robs
    Mar 24 '13 at 13:18
  • I would like CloudFront to server all my content, including webpages and posts. Not just assets.
    – Robs
    Mar 24 '13 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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