I am running wordpress on multiple machines, hence in 'stateless' setup - which means the uploaded media files are hosted on S3 and wordpress directory doesnt contain any media files (they are deleted after uploaded).

My question is: how can I edit (rotate, resize etc') the media files once they are on S3 since they are not physically on the server which im working on? I assume I should download the image i am editing to the server itself but how can I do that since on the next request, I might get a different server to respond...

Hope my question is clear.

1 Answer 1


1) Use persistent storage that can be shared among all EC2 instances within a region - Amazon Elastic File System


2) Give developers access to the AWS console or AWS Command Line Interface to access S3 resources. In addition use AWS Identity and Access Management to limit access; whether it is read-only or read/write. With S3 access, web developers can download S3 objects, modify them, then upload them back into WP (via wp-admin) or S3.

  • Assuming that I have 3 instances running WordPress, all of them uploading the attachments into S3 right after file was uploaded to the instance and then deleting it from the instance itself. How can I later on edit that file? I am working on a server, downloading it to the instance but on the next page-refresh I can get a different instance to respond, unless I am downloading to EFS...right?
    – Broshi
    Mar 13, 2017 at 9:03
  • Using EFS, the original asset will be accessible on all EC2 instances. But in your case without EFS, you need to give your web developers access to S3. Using AWS console or CLI, they can download previous assets, modify them, then re-upload the modified asset in WP (admin). Some assets need to be re-uploaded via WP admin like images since thumbnails are generated. Other assets, e.g. PDFs can be uploaded directly to S3 over the original object.
    – user42826
    Mar 13, 2017 at 10:20

Your Answer

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

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