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%
FastPixel Cache – Optimize Page Speed
🚀 The Ultimate Caching and Speed Improvement Plugin for WordPress Have you ever wished your website scored 90+ on Google PageSpeed Insights, GTMetrix and other website performance analysis tools? And achieve that without the need to pay expensive fees to consultants or learn a lot of advanced technical stuff? ⚡ FastPixel automatically integrates all the latest technical enhancements, such as Page Caching, HTML/CSS/JS minification, DNS prefetching and preloading, Critical CSS, ShortPixel’s Smart Image Optimization, adaptive images, background image scaling and optimization, HTTP/2 support, fonts loading optimization, caching, a global CDN, and Core Web Vitals, within an easy-to-use, 1-minute-setup interface. 🎬 Ready for a Quick TEST of our Speed Optimization Tool? There is no need to install our plugin to run a test. You can test FastPixel live on a sandbox website at TasteWP or you can quickly assess how FastPixel can optimize your website by conducting a test. Simply use this test page, and we will apply all optimizations to a copy of your website. This way, you can easily evaluate the substantial speed improvements it can achieve using the most widely recognized website performance analysis tools. 🆕 New! Object Cache – Now Available! You can now connect FastPixel to your Redis or Memcached server and let our plugin handle the rest. Object caching stores the results of database queries in memory, so WordPress skips repetitive work on every page load, meaning faster pages and less load on your server. No configuration needed. Just connect and go. – No need for additional plugins – Tuned for WooCommerce compatibility – Built for maximum performance with the same resources – Smart cache prefetching – Fully compliant with WordPress – Improved efficiency with simple settings and defaults – Encrypted communication 💡 Why choose FastPixel Caching plugin? Website Performance Boost: Just activate the plugin and within seconds the optimized webpages will start to be served. Lower the CPU/RAM Impact: Using the plugin will reduce the impact on the resources used by your website. All the CPU intensive processing is done in the cloud and resulting pages will generally be served from a cached version and the optimized images from the CDN. Automated Core Web Vitals Optimization: FastPixel takes care of all technical aspects automatically. Smart Cache Warmup/Update: The cache warmup and update are taken care of automatically in a smart way. Pages are cached as they are visited and also updated if you update the content. Critical CSS: CCSS is automatically generated for each page for lightning-fast page loads. CSS/JS Processing: CSS/JS files are combined and also minified and compressed before they are served from our CDN. HTML Optimization: A single, highly optimized HTML file is generated, adaptively serving the ideal webpage based on the visitor’s viewport or device (e.g., mobile, tablet, laptop). DNS Preconnects: Accelerates resource fetching, reduces the access time to external resources. Font Processing: All the techniques to accelerate the processing and delivery of fonts are employed, e.g. font subsetting, font loading control, font compression, font embedding (lower CLS result). Image Resizing & Optimization: Images are automatically resized to fit their placeholders, optimized, and delivered through the ShortPixel CDN. Automatic Next-Gen Images Delivery: Based on the visitor’s browser capabilities, original JPG, PNG, or GIF images are converted to and served as WebP or AVIF when supported. For browsers without support, the original format is provided. 🌟 Happy users that use our plugin If you’re satisfied with the test, just search for “FastPixel” in your WordPress Dashboard > Plugins, install the plugin and see for yourself how much faster your site becomes. Testimonials: ★★★★★ It’s as fast as it says in the title! liquidsnake2021 ★★★★★ I was a tester and now I`m a happy user jppl ★★★★★ This plugin’s fast and easy to set up—I barely have to configure anything fajrisp ★★★★★ Works really well! touto ★★★★★ One of the best tools! torsten3d ★★★★★ Super easy to install and worked out of the box diffler more testimonials 📩 Additional questions If you have more questions, technical or otherwise, please refer to our FAQ section below, our docs or contact us. We typically respond within 15 minutes. Hooks FastPixel provides WordPress action hooks that allow developers to programmatically trigger cache purges and react to cache events. This is useful when integrating FastPixel with custom plugins, WooCommerce, ACF, or any workflow that modifies content outside the standard WordPress editor. Example hooks: do_action(‘fastpixel/purge/all’); – Purges the entire site cache. do_action(‘fastpixel/purge/single’, [‘id’ => 123]); – Purges the cache for a single post, page, or taxonomy term. do_action(‘fastpixel/purge/url’, ‘https://example.com/my-landing-page/’); – Purges the cache for a specific URL. For a detailed documentation about the hooks, please see this page: https://fastpixel.io/docs/fastpixel-hooks/