Has anyone had success hosting Craft on Heroku? I got it up and running, but can't get file uploads to work. Also image thumbnails don't get generated. I am using Craft PRO and Assets are hosted on Amazon S3. I understand that you can't upload assets to Heroku, I thought using S3 should be sufficient to circumvent that fact.

  • I'm having trouble getting it up and running at all -- can you offer any suggestions or give any kind of walkthrough?
    – adrienne
    Nov 26, 2014 at 11:02
  • @adrienne, please ask a detailed question of your own.
    – Florian
    Nov 26, 2014 at 12:18
  • Florian: it's not worth it to me; I'll just give up on Heroku if there's not a walkthrough available somewhere.
    – adrienne
    Nov 27, 2014 at 16:29
  • @adrienne lookie here :D medium.com/@aj1215/craft-cms-on-heroku-79b991665b0b
    – Florian
    Nov 30, 2014 at 18:11

1 Answer 1


I solved the problem by setting the client_max_body_size to, in my case, 20M.

Did this using the following nginx_app.conf

location / {
    # try to serve file directly, fallback to rewrite
    try_files $uri @rewriteapp;

location @rewriteapp {
    # rewrite all to index.php
    rewrite ^(.*)$ /index.php?p=$1 last;

location ~ ^/(index)\.php(/|$) {
    client_max_body_size 20M;
    fastcgi_pass heroku-fcgi;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS off;

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.