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%
JCH Optimize
JCH Optimize improves the performance of your website by performing several optimizations to the HTML page aimed at improving the Web Vitals measured by PageSpeed Insights, such as First Contentful Paint (FCP), Largest Contentful Paint (LCP), Speed Index (SI), Cumulative Layout Shift (CLS), Time to Interactive (TTI), and Total Blocking Time (TBT). These metrics attempt to quantify the quality of the user experience. JCH Optimize can improve these metrics to provide a better experience for your users and improve your PageSpeed scores. Optimizations Performed By JCH Optimize JCH Optimize optimizes your pages by automatically performing some recommended strategies offered by PageSpeed, which include: Minify CSS and JavaScript files and the HTML. Unnecessary whitespaces and other characters are removed to reduce network payload sizes and script parse times. Eliminate Render-Blocking Resources. Inline critical JavaScript and CSS and defer all non-critical resources to prevent resources from blocking the first paint of your page. Defer offscreen images. Offscreen and hidden images are lazy-loaded after all critical resources have finished loading to lower Time To Interactive (TTI). Add Width and Height attributes to images. Set an explicit width and height on image elements to reduce layout shifts and improve CLS. Enable text compression. Boilerplate codes are placed in the .htaccess files at the site’s directory root to instruct the server to serve text-based resources with compression (deflate or brotli) to minimize total network bytes. Preload critical resources. Automatically analyzes each page to identify critical resources to load with a high priority by HTTP/2 enabled servers to improve LCP time. Reduce initial server response. A page cache feature is included in the plugin that integrates well with the other optimization features and significantly reduces time-to-first-byte. Benefits of Using JCH Optimize Research has confirmed that 40% of visitors will leave a website if it takes more than 4 seconds to download. Also, Google and other search engines have indicated that their ranking algorithm increasingly factors website download speed. The benefits of using JCH Optimize then include: Improved user experience. Your users will have a pleasant experience as they browse your site. Improved SEO. Your rankings in Google search pages can increase and improve organic visibility in internet searches. Improved conversions. Your website revenue also increases with increased traffic volume and visitor retention. Pro Version available There is a pro version available with more optimization features and options and premium support with assistance to configure plugin to resolve conflicts and improve performance on our website. How to use To use, first temporarily deactivate all page caching features and plugins, then use the ‘Automatic Settings’ (Minimum – Optimum) to configure the plugin. The ‘Automatic Settings’ are concerned with the combining of the CSS and javascript files, and the management of the combined files, and automatically sets the options in the ‘Automatic Settings Groups’. Use the Exclude options to exclude files or plugins that don’t work so well when combined with JCH Optimize. You can then try the other optimization features in turn such as Sprite Generator, Add Image Attributes, Lazy Load Images, CDN/Cookieless Domain, Optimize CSS Delivery, etc., based on the optimization needs of your site. Flush all your cache before re-enabling caching features and plugins. Documentation Visit our documentation on the main plugin site for more information on how the plugin works and how to configure it to improve your scores on GtMetrix and PageSpeed Insights Advanced Features and Premium Support If you need assistance on your website in configuring the plugin to resolve any conflicts or if you need access to more advanced features such as Http/2 support, Remove unused CSS, Lazy-load iframes, Optimize Images, using multiple domains with CDN, then there’s a Pro version available on a subscription basis. With an active subscription you get premium technical support through our ticket system, access to downloads of new versions, and access to our Optimize Image API.