I'm getting ready to move my company's website and order management application to AWS. We use wordpress as the 'face' of our company. Our order management app is for internal use. I'm using Elastic Beanstalk to manage my instances/load-balancers/etc. We are still developing parts of the app so we use Git to upload the changes.

What is the best strategy for storing the Wordpress media files? Say we do a new post and upload a new image. If a 2nd instance spins up, it will have the post (pulled from db), but will it be able to find the image (stored on 1st instances EBS)? Similarly, if the first instance fails or is spun down, will it take all the media files with it?

It seems like this would be an important and common problem. What are other people doing? I've found two plugins, but I'm not initially thrilled with them.

http://wordpress.org/extend/plugins/wp2cloud-wordpress-to-cloud/ --I'm having trouble figuring out how to upload the plugin files, and I'm leery of switching db engines - unless others say that it works

http://wordpress.org/extend/plugins/wp-s3/ --does this solve the multiple instances problem?

So again, my question is how can i keep Wordpress media files permanent while EC2 instances may be prone to failure, spin ups, or spin downs?

  • Your best bet may be mounting the folder where WordPress stores uploads via s3fs. – ceejayoz Jan 29 '13 at 19:40
  • @ceejayoz I've attempted this. Definitely not recommended if you care about file integrity. – jamieb Mar 20 '13 at 3:47

I have run into this same case as well. After trying different server related options that were buggy at best I started looking at WP plugins. I found that wp-s3 didn't provide the level of functionality I needed so began development on my own s3 media management plugin https://github.com/codearachnid/wp-s3media that automagically load your uploads into a s3 bucket and retains the image editing and linking functionality of the media library all with core WordPress functionality intact. Feel free to try it out - albeit in a rough state at the moment.

| improve this answer | |
  • Does the cron task work correctly if there are multiple servers running the front end? It appears that wp-cron is only setup if it is to big for the request. I just looked quickly though the code but will try to set it up tomorrow. Thanks for code. – Hal Jan 31 '13 at 2:38

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.