Amazon S3 Uploads
[resolved] upload only to S3, not also to WordPress' server? (5 posts)

  1. Clifford Paulick
    Posted 3 years ago #

    I only want the uploads to go to S3 because of limited storage space on my server's hard drive.

    I don't just want a CDN like MaxCDN because all the files are still on my server; they're just cached with MaxCDN.

    I actually want my entire Media Library or whatever other files to be in S3 and not also on my server.

    So all references to http://www.example.com/wp-content/uploads/file.jpg should instead be s3.example.com/... or whatever.

    How can this be done?

    Thank you.


  2. atvdev
    Plugin Author

    Posted 3 years ago #

    Amazon S3 Uploads does exactly what you ask, it uploads all you content from http://www.example.com/wp-content/uploads/ to Amazon S3, deletes the uploaded files from your server and everytime that a file like http://www.example.com/wp-content/uploads/file.jpg is requested, it automaticaly redirects to the file that is on Amazon S3.

    If you have installed the Amazon S3 Uploads plugin and you see that there are same files on Amazon S3 and on your server, then the plugin must have a bug...

    Be aware that files from your server are uploaded to the Amazon S3 via cron job and not immediately. So you will have to wait some minutes (around 10) to see results.

  3. Clifford Paulick
    Posted 3 years ago #

    Your clarification got me to try it. It does work as you stated. :-D

    HOWEVER, major questions:

    1) I looked at main site's .htaccess and I don't see that this plugin is writing anything to that. So how is it doing the redirects to s3?
    -I like that the URL of the blog post doesn't have to change and that it redirects/serves it from s3.

    2) Related to Q1, what happens if I choose to disable this plugin. Does my blog now have NO images??? Or does it just not continue the cronjob in the future?

    Thank you.

  4. atvdev
    Plugin Author

    Posted 3 years ago #

    About your questions,
    1) the .htaccess is created in the uploads directory, as it must make changes only to the files requested from that directory
    2) If you turn off the plugin, the cron job will stop, images that are already on the Amazon S3 remain there and are streamed from Amazon, new images that you will upload will be stored on your server and streamed from your server.

    If you want all your files to be again on your server, you will have to manually download them from Amazon S3 selected bucket (and subfolder if applied) to your uploads folder. Folders on your server and on Amazon S3 are maintained the same eg.
    on Amazon S3 it is stored


  5. Clifford Paulick
    Posted 3 years ago #

    Excellent. Thank you.

    Nice plugin. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic