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%
NitroPack – Performance, Page Speed & Cache Plugin for Core Web Vitals, CDN & Image Optimization
Speed up your WordPress site, achieve a 90+ Performance score on PageSpeed Insights, and pass your Core Web Vitals with NitroPack. Boost your website’s speed effortlessly with NitroPack, the ultimate solution trusted by hundreds of thousands worldwide to climb Google rankings, boost conversions, and expand businesses. NitroPack stands above traditional caching with its cloud-based infrastructure and advanced optimizations, delivering top scores on Core Web Vitals and Lighthouse tests. This ensures a seamless, fast experience for your visitors. Experience unmatched performance with features like cutting-edge caching, full image optimization, code optimization, an integrated global CDN, and lazy loading. NitroPack is your all-in-one tool for a lightning-fast website that captivates visitors and drives conversions. Why choose NitroPack? Instant Performance Boost Without Coding: NitroPack delivers a significant website speed and performance boost instantly, eliminating the need for complex coding or technical expertise. Enjoy faster page load speed, improved page speed scores, and better user experience effortlessly. Automated Optimization for Core Web Vitals: NitroPack automates the optimization of Core Web Vitals, ensuring your website consistently meets and exceeds the page experience metrics that impact user experience, SEO, and search engine rankings. Learn more about how we can help you boost your Core Web Vitals scores with our latest webinars with Google. Optimizations with Zero Impact on Your Hosting’s CPU and RAM: NitroPack handles all resource-intensive performance optimization tasks, including caching, image optimization, and file minification, on its own servers. This preserves your hosting resources while improving website speed and page performance without putting strain on your server’s CPU or RAM. An additional customer-centric approach safeguards your site’s performance and stability by working on copies of your files, meaning your original content stays unchanged. With NitroPack, you can optimize page speed and user experience confidently, knowing your website’s integrity is protected. Speed up your site with NitroPack ✅ What’s included in the Free plan? NitroPack’s Free plan* is recommended for small websites and testing website speed optimization. Install it on up to 1 website (no CC required) and experience the powerful performance and cache optimizations we offer firsthand before committing to our paid subscriptions, starting at $7/mo. With up to 1,000 pageviews and 1GB of CDN bandwidth included monthly, you can leverage over 35 of NitroPack’s speed optimization features across Caching, Image and Media, JavaScript, HTML and CSS, and Fonts. Within seconds of installation, NitroPack applies the following features automatically to boost page speed, improve site speed, and fix common WordPress performance issues: Caching: Minify Resources, Ignored parameters, Cache Reset, Excluded resources, Excluded URLs, Dynamic content cookies, Advanced caching, Smart cache invalidation, Light Purge, Device-aware caching, Integration with 3rd-party cache, Cache Warmup Image and Media: Lazy load images, Lazy load iframes, Video facades, Lossless and Lossy Image Optimization, WebP Conversion, Preemptive Image Sizing, Lazy loading of background images JavaScript: Remove render-blocking resources, JS Minification, Third-party Scripts Optimization HTML and CSS: Keep HTML comments, HTML normalization, Generate critical CSS, Custom CSS, Combine CSS, CSS Minification, Advanced CSS Management, Advanced Resource Loader, HTML Minification, Page prefetching and prerendering Fonts: Override Font Rendering Behavior CDN: Static Content Caching, GZIP and Brotli Compression, HTTP/3 Compatibility. For questions and technical assistance, customers on the free plan can rely on our 24/7 ticketing support system. What makes NitroPack the ultimate speed optimizer? 💾 ADVANCED CACHING: Thanks to its advanced features and smart caching system, NitroPack ensures fast and stable website performance, even during traffic spikes. Automatic Cache Warmup: Preloads cached pages to ensure fast delivery from the first visit Smart Cache Invalidation: Keeps cached content fresh without unnecessary cache resets Device- and Cookie-Aware Caching: Delivers optimized cache versions for different devices and users for a tailored and fast user experience. Browser Cache: Improves load speed for returning visitors by leveraging the built-in browser cache 🖼️ IMAGE OPTIMIZATION: NitroPack eliminates manual image optimization by automatically reducing image size by up to 7x while preserving quality, dramatically improving page speed and user experience. Automatic Image Optimization: Dynamically resizes images, converts them to WebP format, and applies the best compression technique to reduce file sizes without sacrificing quality Adaptive Image Sizing: Optimizes images to perfectly fit their display containers across devices for an enhanced user experience Advanced Lazy Loading: Improves page load speed by loading offscreen images and videos (including GIFs, YouTube, Vimeo, and Wistia) only when needed 🌐 BUILT-IN GLOBAL CDN: NitroPack includes a global Content Delivery Network (CDN) powered by Cloudflare, delivering content from hundreds of servers across 120+ countries. Ultra-fast CDN delivery for static and dynamic content, regardless of your users’ location GZIP & Brotli compression for faster data transfer HTTP/3 support for modern, high-performance connections 🛠️ CODE OPTIMIZATION: NitroPack’s code optimization engine improves page speed and performance by optimizing HTML, CSS, and JavaScript automatically. Advanced Resource Loader for intelligent management of resource loading without the need for technical intervention Critical CSS optimization that prioritizes above-the-fold CSS for rapid page rendering, making your site appear faster to users Deferred JavaScript loading for improved page responsiveness CSS & JS combining and minification for improved loading efficiency, reduced HTTP requests, and faster overall site speed. HTML compression and DNS preconnects reduce the time it takes to fetch external resources ✏️ FONT OPTIMIZATION: Improve website speed by optimizing web fonts by over 60%, including Google Fonts, without sacrificing design. Font subsetting to remove unused glyphs on the page Deferred font loading for better page experience Font compression (WOFF2) to reduce font file size by up to 50% Google Fonts optimization via hosting them on our CDN To view a complete list of NitroPack’s features, visit the feature page. ☎️ 24/7 SUPPORT: All NitroPack customers receive expert live chat support and access to an extensive knowledge base for site speed, performance, and cache-related issues. 🔒 SECURITY AND COMPLIANCE: Your safety is our priority. NitroPack is SOC2 Type 2 compliant and ISO 27001 certified, internationally recognized standards for managing information security. We have a devoted team of security specialists working around the clock to uphold the highest level of security and compliance. By implementing industry-leading practices, we ensure your data remains secure and your peace of mind intact, while optimizing website performance. 🔌 COMPATIBILITIES: NitroPack integrates seamlessly with the most popular WordPress plugins and themes to provide a smooth user experience: Plugins: WooCommerce Elementor Divi Builder Yoast SEO Squirrly SEO All in One SEO Pack Rank Math SEO Contact Form 7 WPML Cloudflare WPForms Gravity Forms WPBakery Beaver Builder Fusion Page Builder Thrive Architect HubSpot All-in-one WP Migration OptinMonster Drift Chat LiveChat Tawk.to Chat ShortPixel GeoTargeting WP Mediavine MainWP And more Themes: Astra OceanWP Neve GeneratePress Avada BeTheme Divi X Enfold Sena Jupiter Thrive Davenport And more SHARE THE NITRO 💜 Join our Facebook Community. Learn from our tutorials on YouTube Channel. Contribute to NitroPack’s translations Or rate us on WordPress 🙂 *The Free plan includes a small NitroPack badge in the footer to show visitors the website runs on top-tier performance optimization tech.