Skip to main content

Disk clean up

Is there a way (or should there be) to remove/clean up posts or media that are X-days/years old? Or are the storage needs so small as to be unnecessary?

Shahjahan Jewel

If you delete a post or commect, all the related media assets will be deleted. I would recommend to offload your media and use Cloudflare R2. We have a pretty good integration with both S3 and R2.

Jeffrey Young

Shahjahan JewelΒ fantastic. thanks. I'll use R2 :)

Mat β€Ž

Shahjahan JewelΒ I wish there would be an option for the Admin to set the Global Expiration Date (Pro) for posts but also the expiration date on an individual post (Pro) so after that date (retention policy: x months/x year) the post would be deleted or hidden from users (option to choose) so we could keep a hygiene in the long term.

Not a high priority request rather suggestion.

Shahjahan Jewel

Mat Β­Β I have a plan to add bulk operation screen where you can list all posts or comments and then filter, select all and delete!
These things should not be automated in the core.

Mat β€Ž

Shahjahan JewelΒ retention policy could be beneficial but yes. if Admin will have such a bulk operation screen than fine for now. In a long run it can be on your list haha.

Debo Ogunrinde

Jeffrey YoungΒ What informs to use either S3 vs R2? is it just preference? I am trying to decide if there is benefit to either. TIA

Shahjahan Jewel

Debo OgunrindeΒ Go with R2. It has a built-in CDN and no configuration is required. Also, Cloudflare is crazy fast and years ahead of S3.
Also, R2 is super cheap.

Cointacter

Debo OgunrindeΒ anything AWS is the most expensive on the planet earth. Of course most secure too, but definitely not fastest. R2 is the best, just Google it, don't you want to find out stuff yourself instead of blindly believing anyone? I don't trust anyone and even if someone would answer such question like yours I'd check myself for the answer

Cointacter

Shahjahan JewelΒ I have a question in regards to R2. Talking about other media in wp media, blog posts featured images for example. There is no way to use the same offloading from fluent ?

Jeffrey Young

Debo OgunrindeΒ  R2 is free for 10gb, cheap after that, and I'm already using Cloudflare :)

Debo Ogunrinde

Shahjahan JewelΒ  Thanks...will do.

Debo Ogunrinde

Jeffrey YoungΒ Thanks for the clarification...I am already using the free cloudflare...so will use R2.

Debo Ogunrinde

Rosvaldas NudasΒ Thanks...interesting take however, "just Google it, don't you want to find out stuff yourself blindly believing anyone?"

Shahjahan JewelΒ missing bunny net

Cointacter

Debo OgunrindeΒ missed a word in the sentence as was typing in the car. But yeah, simple example, imagine buddyboss or peepso approaches you and says we're better than fluent, while in reality they're not. Same with many plugins, sometimes googling won't help but it's not the case with the biggest cloud companies on the planet.

Jeremy Moll

This brings up an interesting point, however!

In some use cases it would be very valuable to be able to purge old content, either automatically (according to a global setting) or manually by an admin.

Example: all posts older than a year are automatically deleted

This would allow community administrators to limit storage use and content bloat or purge expired content which is no longer needed or relevant.

Shahjahan Jewel, does this look like something that could be introduced at some point?

Mat β€Ž

Jeremy MollΒ even periodic scheduled cleanup run could be good but we need a #Retention Policy tag to be assigned to posts.

Thomas

Question for the community: When a picture is deleted is it supposed to automatically delete from R2? I deleted a picture I sent in chat for testing purposes and it still shows up in the R2 bucket. Will that not add more cloudflare costs over time if the objects aren't cleaned automatically?

Shahjahan Jewel

Thomas HallmanΒ we delete media files in the background. So it will be deleted by tomorrow. I will check our callback function to verify.

Thomas

Great. Thank you.

Assaf Manor

Shahjahan JewelΒ I think a good option would be to let an admin to move to R2 and to transfer all the files from the local server to R2 and that all the media that was related to the old posts would be associated with the transferred media now in R2.