Every WordPress developer who have ever looked into database knows that transients can leave big mess. There are couple of plugins that already do cleaning, but they have a few problems:
- unnecessary complicated
- don’t remove all transients
- not multisite compatible
- performing direct database calls for deletion
Since I didn’t like all of this, I created Clean Expired Transients. It is simple, hooks to native WordPress hook that runs once daily, cleans all transients older that one minute, and it’s multisite compatible.
You can call it any time using simple
Clean_Expired_Transients::clean(); call from your custom code, or use it in your project.
It is also first plugin that I made available through Composer.