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%
WP Performance
WP Performance makes your WordPress site load faster without the headache. Turn on a few options and the plugin handles caching, asset optimization, and image delivery for you. Not sure where to start? Open the Overview tab and pick a one-click preset (Safe, Balanced, or Aggressive). You can fine-tune anything afterwards. Version 2.0 is a complete rebuild with a fast new dashboard and no third-party dependencies. Everything below works together out of the box. Caching Page cache – serves a static HTML copy of each page, before WordPress even loads Block cache – cache just the slow parts of a page, even on pages you can’t fully cache (more below) Cache preloading – warm the cache from your sitemap Browser caching – tells browsers to keep files so repeat visits are instant GZIP compression – sends smaller files to the browser Object cache – optional Redis drop-in to cut database load Smart by default – skips logged-in users and WooCommerce/EDD cart pages, and ignores tracking parameters (utm, gclid, fbclid) so clean URLs share one cache Mobile cache – keep a separate copy for mobile devices when you need it CSS Minify CSS (inline and files) Combine CSS files Load CSS without blocking the page Remove unused CSS, per page Critical CSS Combine Google Fonts, or host them on your own server Control font loading (font-display) DNS prefetch and preconnect hints JavaScript Minify JavaScript (inline and files) Combine JavaScript files Defer JavaScript Delay JavaScript until the visitor interacts (great for third-party scripts) Disable scripts you don’t need, site-wide or per page HTML Minify HTML Remove comments and unneeded markup Images and media Lazy load images and videos (uses native browser lazy loading) Responsive images Add missing width and height to stop layout shift (better CLS) Preload your largest image and set fetchpriority for a faster LCP Convert images to WebP and AVIF Custom image sizes and one-click thumbnail regeneration Disable emojis and embeds Database Clean up revisions, auto-drafts, trash, spam, transients, and stale cron tasks Schedule cleanups daily, weekly, or monthly CDN Rewrite asset URLs to your CDN, with exclusions Tools Overview dashboard with environment health checks One-click presets – Safe, Balanced, Aggressive Restore points – roll back to your last five saved configurations Troubleshooting log with a live viewer Export and import your settings Per-page exclusions from the post editor WP-CLI commands Multisite support Block cache Block cache stores the rendered output of a section of a page and reuses it, even on pages that are not fully cached (like logged-in or dynamic pages). Use it three ways: Cache block – add the “Cache” block in the editor and put any blocks inside it Shortcode – [wpp_cache ttl="600"]...[/wpp_cache] PHP – in a template: if ( wpp_cache_start( ‘sidebar’, [ ‘ttl’ => 3600 ] ) ) { expensive_render(); wpp_cache_end(); } You choose how long to cache and whether to keep a separate copy per page, per device, per role, or for logged-in visitors. Add-ons Cloudflare – purge cache and control Cloudflare settings Varnish – auto-purge Varnish cache Prefetch – prefetch links on hover for instant navigation WP-CLI wp wpp flush – clear the page cache wp wpp flush-blocks – clear the block cache wp wpp enable – enable WP Performance wp wpp disable – temporarily disable WP Performance wp wpp cleanup [ ] – run a database cleanup (all, trash, spam, revisions, autodrafts, transients, cron) Languages English Hrvatski (Croatian) Report bugs Found a bug? Please open an issue on GitHub.