Plugin Support
Adrian
(@adrianrus)
Hi @hackrepair ,
Thank you for your message! I’m sorry to hear about this issue 🙁
No worries, I totally understand your frustration about this!
These images are indeed created by our plugin but they are used temporarily while we move around the original files to the backup location. Normally, these files should be removed immediately after the optimization is done, and since they are left there, I think there is some kind of permissions limitation that doesn’t let our plugin remove them.
Also, since the /tmp folder is used to store temporary files, it should be automatically purged by your hosting provider as this is how the /tmp folder works in most cases.
To be more specific those files were never meant to stay there forever, normally they should be there for a few seconds/minutes until we move the original files to the backup location and that’s it!
Could you please ask your hosting provider why the /tmp folder doesn’t get purged periodically?
Looking forward to your reply!
You’re correct that the system can clear /tmp, but it’s not a guarantee that the space is safe mid-job. On many cPanel servers, /tmp is cleaned by tools like tmpwatch or on reboot.
It’s also common for shared-hosting providers to allocate a relatively small partition for /tmp.
So if a client is trying to process, say, 100 GB of images and /tmp is only 10 GB, well, you’ve got a potential disaster at play: big file job + small working area = risk of “disk full” or failed operations when /tmp is full.
From a hosting and plugin best-practice standpoint, it’s better if a plugin keeps all its temporary files inside the client’s account (for example, under wp-content/temp).
This way, the client has visibility and control—rather than relying on the server’s root /tmp, which most clients do not have access to in an emergency (like, for instance, when the ShortPixel Image Optimizer plugin fills up /tmp).
-
This reply was modified 4 months, 3 weeks ago by
hackrepair.
Plugin Support
Adrian
(@adrianrus)
Hi again, @hackrepair ,
Most hosting providers purge the /tmp folder automatically when it reaches a certain usage percentage so it never really gets to 100% to cause issues, this is also why most PHP scripts also save the temporary files there.
We’ve been having this system in place for years now and never had any users reporting their /tmp getting full because of our plugin, but I totally understand your point about the client side location for the temporary files.
I’ve noted your feedback so I can discuss it with my colleagues to see if there’s anything we can improve in this area in the future!
All the best,
-
This reply was modified 4 months, 3 weeks ago by
Adrian. Reason: typo
Plugin Author
Pedro
(@petredobrescu)
Hello @hackrepair,
This has been addressed in version 6.4.1 of our plugin, recently released. Please note that it does not clean previous temporary files, but from now on it should not leave traces anymore (unless permissions or other issues prevent the deletion of temporary files).
Thanks for reporting this!