• Resolved binarystarr

    (@binarystarr)


    Hello

    I’m successfully using the plugin to serve assets from an s3 bucket however, when i delete an item from the media library (permanently delete) it doesnt get removed from the s3 bucket. It does get removed locally though.

    In an effort to keep things properly synced, is there a setting which will delete from s3 when deleted from the library?

    Best
    Richard Starr

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @binarystarr,

    I am sorry about the issue you are having with removing items from the S3 Bucket but I am happy to assist you with this.
    Go to Performance>CDN, advanced sub-box and see if the option “Only purge CDN manually” is selected. If so, you will need to purge CDN manually in order for changes to take place.
    “Only purge CDN manually” is created because of the problems with invalidation requests on CloudFront causing huge bills. If it’s enabled, you can click the purge CDN button in W3 Total Cache to send invalidation requests, otherwise all changes will be detected automatically and an invalidation request will be sent immediately.
    I hope this helps.

    Thread Starter binarystarr

    (@binarystarr)

    Thank you Marko for such a swift response.

    The “Only purge CDN manually” option is not selected so if i understand you correctly the system should be deleting from s3?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @binarystarr,

    Sorry for the confusion. W3 Total Cache can not delete anything from the S3 Bucket.
    Does the image you deleted from the media library still showing on your website or you just want to delete it from S3 bucket?

    Thread Starter binarystarr

    (@binarystarr)

    Ah, i understand.

    The image no longer shows on the site but it is still in the s3 bucket. That makes it an orphan, something i am not keen on.

    I guess this could be solved with some custom code that hooks into the?‘delete_attachment’ hook?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @binarystarr,

    Please check this AWS guide on how to delete objects from S3 bucket
    https://docs.aws.amazon.com/AmazonS3/latest/user-guide/delete-objects.html

    Thread Starter binarystarr

    (@binarystarr)

    Thanks Marko!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Deleting from s3 when deleted from library’ is closed to new replies.