CDN With S3 Media Library Question
-
I am using wordpress in AWS using Elastic Beanstalk. I setup a local WP instance and built a new theme, pages, and added my needed plugins. This included uploading some media files to the media library for the static home page and such. I then setup W3TC and pushed everything to S3 CDN. I did a little more configuring and everything seamed to be just fine.
I then pushed everything to a local git and used git was.push to push the application to an Elastic Beanstalk environment. I added the uploads folder to the .gitignore so because I do not need them pushed to the server because I am relying on S3 for the media files.
Once running in AWS the pages load fine and it looks like everything is being sourced from S3 but when inside the wp-admin > Media > Library all of the links are broken. I thought it was a good idea to not include the uploads folder on the deployment to AWS but I think I need then now that I see this issue.
My problem is with Auto Scaling. If I include the uploads folder and then someone uses the wp-admin from another instance and uploads some media then that media might not be on another EC2 instance. Isn’t this the reason to use W3TC? Why would I need to have the images on the server? Is there a reverse of pushing media files to S3? How do others handle this?
Sorry if this is a stupid question but I have spent a bit of time trying to understand things and I just can’t figure out the right approach.
- The topic ‘CDN With S3 Media Library Question’ is closed to new replies.