Transient Cleaner
Clean expired transients from your options table. The original and best! Transient housekeeping was added to the core of WordPress after version 5.8. However, I have decided to open up this plugin to all versions to allow for manual transient cleaning. Longer term I am working on a new version of the plugin, designed specifically for all WordPress releases. Tested up to PHP 8.2 Fully complies with WordPress coding standards Compliant with the stronger WordPress VIP coding standards, as well as compatibility with their platform Community plugin – visit the Github page to get involved with the latest code development, request enhancements and report issues “Transients are a simple and standardized way of storing cached data in the WordPress database temporarily by giving it a custom name and a timeframe after which it will expire and be deleted.” Unfortunately, expired transients only get deleted when you attempt to access them. If you don’t access the transient then, even though it’s expired, WordPress will not remove it. This is a known “issue” but due to reasons, which are explained in the FAQ, this has not been adequately resolved. Why is this a problem? Transients are often used by plugins to “cache” data (my own plugins included). Because of this it means that expired data can be left and build up, resulting in a bloated database table. Meantime, this plugin is the hero that you’ve been waiting for. Simply activate the plugin, sit back and enjoy a much cleaner, smaller options table. It also adds the additional recommendation that after a database upgrade all transients will be cleared down. The Settings Screen Within Administration -> Tools -> Transients an options screen exists allowing you to tweak when you’d like cleaning to happen, including the ability to perform an ad-hoc run, and when you’d like the to be automatically scheduled. You can even request an optimization of the options table to give your system a real “pep”! Running in Lite mode A “lite” mode is available. By activating this the options screen will no longer appear and default settings will be used. The advantage? Improved performance to Admin and, especially if you’re running multi-site, no chance of anybody “tinkering” with the settings. To activate, use the following… define( 'TC_LITE', true ); This should be added to your wp-config.php file. Using hooks If you’re the type of odd person who likes to code for WordPress (really?) then I’ve added a couple of hooks so you can call our rather neat cleaning functions… housekeep_transients – this will clear down any expired transients clear_all_transients – this will remove any and all transients, expired or otherwise Acknowledgements I’d like to thank WordPress Developer Andrew Nacin for his early discussion on this. Also, I’d like to acknowledge the useful article at Everybody Staze for ensuring the proposed solution made sense, and W-Shadow.com for the cleaning code. Iconography is courtesy of the very talented Janki Rathod.
Top keywords
- transients10×2.00%
- wordpress8×1.60%
- expired6×1.20%
- options5×1.00%
- cleaning4×0.80%
- table4×0.80%
- added3×0.60%
- code3×0.60%
- data3×0.60%
- database3×0.60%
- expired transients3×0.60%
- options table3×0.60%
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score
Powered Cache is your comprehensive solution for enhancing WordPress site performance, ensuring a swift and seamless user experience. The Free version provides essential tools to boost your site’s speed while the Premium version unlocks a suite of advanced optimization features. Features ⚡️ Simple and easily configurable: Import and export settings effortlessly. Page Caching: Accelerate page loads, trusted by top-tier websites. Object Caching: Speed up dynamic pageviews. It supports Redis, Memcached, Memcache, and APCu. Page Cache Rule Management: Need advanced caching configurations? Got it covered under advanced options. Details File Optimization: Easily minify and combine CSS, JS files. Eliminate render-blocking resource problems easily. And more Database Optimization: Keep redundant data away from your database. Media Optimization: Enable Lazy Load, replace YouTube videos with thumbnails, control WordPress embeds, remove emoji scripts. Combine Google Fonts: Combine Google Fonts URLs into a single URL and optimize the font loading. Rewrite Support: Automatic .htaccess configuration for the ideal setup. The cached file can be served without executing PHP at all. Mobile Support: Separate cache file for mobile, in case want to use the separate theme for the mobile. Logged-in User Cache: If you have user-specific content or running a membership site, it creates cached results for the logged-in users. CDN Integration: Integrate your website with CDN; you just need to enter CNAME(s) and corresponding zones. Cache Preloading: Creating cached pages in advance. This feature will keep caching layer warm. Prefetched DNS: Resolve domain names before resources get requested. Reduce DNS lookup time. Gzip Support: Compress caching files with gzip. Built-in Extensions: Cloudflare, Heartbeat Multisite Support: You can activate network-wide or site basis. It’s compatible with domain mapping. Smart Cache Purging: Only purge the cache that is affected by the content changes. Compatible: Tested and compatible with popular plugins. Battle Tested: Trusted by enterprise-grade websites. Built-in Extensions Built-in extensions (aka add-ons) shipped with Powered Cache to provide more functionality. Cloudflare: Cloudflare compatibility and functionalities Free Heartbeat: Manage the frequency of the WordPress Heartbeat API. Free Varnish: Varnish cache purging Premium only Google Tracking: Powered Cache will host Google scripts on your server to help satisfy the PageSpeed recommendation. Premium only Facebook Tracking: Powered Cache will host Facebook scripts on your server to help satisfy the PageSpeed recommendation. Premium only Premium Features Explore the powerful capabilities offered by Powered Cache Premium: Critical CSS & Load CSS Asynchronously: Accelerate your page load times by prioritizing essential styles. Remove Unused CSS: Smartly scans your website to identify and eliminate unused CSS rules, optimizing performance. Automatic Image Dimension Assignment: Adds missing dimensions to images to improve layout stability and speed. Link Prefetching: Pre-fetches links to provide a smoother user experience. Image Optimizer: On the fly image compression, including AVIF/WebP format conversion, to enhance load speed. Sitemap Preloading: Automatically visits URLs listed in your sitemap to pre-generate cache, ensuring faster load times for your visitors. Scheduled Database Cleanups: Automates database optimization tasks to maintain peak performance. Varnish Extension: Enhance your site’s caching capabilities with Varnish support. Google & Facebook Tracking Extensions: Host external tracking scripts locally, with automatic updates when the external resource changes. WP-CLI Support: Command-line options available to streamline your workflow. Top-Notch Premium Support: Get high-quality support for any issues you might encounter. Ad-Free Plugin Interface: Enjoy an uncluttered, ad-free plugin admin page. By upgrading to Powered Cache Premium you also get access to one-on-one help from our knowledgeable support team and our extensive documentation site. Learn more about Powered Cache Premium Contributing & Bug Report Bug reports and pull requests are welcome on Github. Some of our features are premium only, please consider before sending PR. Documentation Documentation site: https://docs.poweredcache.com/ Developer Docs: https://poweredcache.github.io/docs/ (Hook reference)