1

I have a existing wordpress website in Elasticbeanstalk AWS with auto scaling and load balancing and external RDS. while scaling policies are applied I will loose my existing data in EC2 instances so I want to keep it in such a place where I don't loose any configuration and data. I do not want to use EFS and rather would like to use S3 for this to achieve I did not find a clear documentation in internet as to how to achieve it. Can somebody help me with as to how to achieve it.

Note: I want to keep all my data which includes media files and wordpress config files as well on a whole view everything that I should have the wordpress running even the new instances are launched.

Alex
  • 172
  • 1
  • 1
  • 8

1 Answers1

1

S3 isn't really made to be a file system, it's an object store. However...

S3 as File System

You can use S3FS, which makes S3 work like a file system. You take a risk though, as it might not work 100% perfectly.

Media Files on S3

Storing media files in S3 is no problem. You can use a plugin (there are many, I can't recommend any in particular), copy existing files up there, S3 will serve the files directly reducing the load on your server. The plugin should upload new files to S3 automatically.

Config Files on S3

Storing config files in another bucket so you can auto-configure your Wordpress instance, sure, download it when the instance starts up using user data. This means you don't have to update your golden image constantly.

EFS

I know you said you don't want to use EFS, but why is that? This is exactly what EFS is made for, to be a shared file system. Performance scales with storage, so you do may need to store some large dummy files there to get performance up if you have a busy site.

AWS have recommendations for Wordpress that includes EFS.

Tim
  • 31,888
  • 7
  • 52
  • 78
  • can EFS be really the case to have a solution for this problem becuase my Idea of EFS is like we can only store the media files as s3 does. Can you guide through the steps of how can I use EFS to fully upload my wordpress instance while I deploy or re deploy my wordpress application with changes and when a instance is launched newly how its going to work ? any documents or guidance will be great ... thank you very much – Alex Apr 27 '19 at 20:50
  • I have added a link to AWS best practices for Wordpress to the bottom of my answer. – Tim Apr 27 '19 at 21:23