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%
WEDOS | Protection & Cache Performance
Activate WEDOS Global protection — WAF, DDoS protection and CDN for your WordPress website. WEDOS Global (CDN Cache & Security) WEDOS Global Protection plugin helps site administrators activate WEDOS.protection from inside WordPress. The plugin provides a simple landing page for non-technical users, guided website and DNS setup, a dashboard with protection status, and a consent step before any external service activation request is sent. Cloud WAF & DDoS Protection By filtering traffic and blocking harmful cyberattacks on cloud servers, our WAF provides protection for your WordPress websites without putting any extra load on your local resources. Global CDN Cache The WEDOS Global CDN will ensure a significant increase of your WordPress loading speed, and better overall server response all around the world. Links to Documentation and Other Sources WEDOS Global Knowledge Base Community Help External Services This plugin connects to the following external services: WEDOS Global Protection (plugin.wedos.global) Verify domain ownership via a local verification file Register and activate the domain protection service Check the protection and DNS status Data sent: domain name, server IP address, admin email address, unique request ID. No personal visitor data is ever transmitted. WEDOS CDN (wp-cdn.wedos.com) Serves WordPress core and WooCommerce static assets (JS, CSS) from WEDOS CDN edge nodes Fetches a manifest file listing available asset versions and their SHA-256 hashes Assets are only rewritten when local file hash matches the CDN manifest — no data about visitors is transmitted CDN is opt-in and can be disabled at any time from the dashboard Anonymous telemetry (plugin.wedos.global/cdn-plugin/telemetry.php) Sends anonymous usage statistics once daily when opted in: plugin version, WordPress version, rewrite count No domain name, no IP address, no personal data is included Subscription management (plugin.wedos.global) Used only when you start a free trial or subscribe to a paid plan (Standard, Premium) Data sent: domain name, admin email address, selected plan identifier Subscription status is queried periodically to determine which paid features (e.g. detailed visitor geography) are unlocked The free plan does not require any subscription data exchange Billing provider (FastSpring) When you purchase a paid plan, your order is processed by FastSpring (fastspring.com) FastSpring acts as the merchant of record for the transaction See FastSpring’s privacy policy for details on data they collect during checkout Bundled Third-Party Libraries The plugin ships with the following open-source libraries (no external network calls — all bundled locally): Chart.js 4.4.0 (MIT license) Used for analytics charts (requests over time, top countries bars) Source: https://www.chartjs.org/ License: https://github.com/chartjs/Chart.js/blob/master/LICENSE.md jsvectormap 1.7.0 (MIT license) Used to render the interactive world map in the Visitor Geography section (paid feature only — loaded when geographic analytics are unlocked by the active plan) Source: https://github.com/themustafaomar/jsvectormap Map data renders aggregated country traffic counts received from the WEDOS Global Protection backend; no visitor data is sent anywhere License: https://github.com/themustafaomar/jsvectormap/blob/master/LICENSE The service is provided by WEDOS Group SA, 7 Rue Robert Stumper, L-2557 Luxembourg, EU. Terms of Service Privacy Policy By activating the plugin and clicking “Create request”, you explicitly consent to your domain data being sent to the WEDOS Global Protection service.