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%
Ultimate media cleaner
Ultimate media cleaner give you the power to find “unused files” (please read the next line) in your sites and delete them Unused files is more “not usage found” with our detection system. You have to know that WP is easy to use, but is a very complex software. Remember that WP can be used like e-commerce, video share platform, normal blog, etc. So is impossible to be 100% accurate about the “unused files”, so for this version we changed for “Not usage found”, this phrase is more accurate about what this plugin do PRO VERSION We made one Pro version, we added some “nice to have feature”, you can find it at Ultimate media cleaner PRO Crawler option Even if we made all possible to try to find reference in the database, there are some files used in ways impossible to detected internally. The only way is to use one web crawler and to detect the reference in direct in your HTML, JS and CSS code We work in our own web crawler, you can find it at Ultimate media cleaner Crawler (external and pay service) We made one Pro version, we added some “nice to have feature”, you can find it at Ultimate media cleaner PRO HOW THIS PLUGIN WORK Is important to you to know how this plugin work, so here we go: The plugin is composed in 5 prat Find files from database and find files from your folder system part This two parts are really similar, the unique difference is where the information is coming from. Files from the database will show you every file and images found in the database (in your database this will be the table Post with values post_type=’attachment’) And folders, are files found in the wp-upload folder. Keep in mind that some plugin use this folder to add their own files, and this plugin will not detect their usage After selecting from where you want to show the WP files The plugin will try to find out if the file is used or unused, this is made with some sql script, trying to found some physical reference in post and pages Try to find if the file is used in some shortcode (coming soon) Found if the crawler system detected the file (pay service) Show you the result and give you the opportunity to delete, ignored the “unused files”, if is used, the plugin will not show any option You can ignore the file, because you know that this file is used, but the file have the “unused” label You can put in the delete list (this will not delete the file) Keep in mind that the “not usage found” label can have from 0% to 100% accuracy The delete list part You can see every file that you want to delete, so have two option, continue and delete them or remove it from them from the list Try to make your own verification and validate that the file you want to delete is not used in your site The option part You can found some useful configuration, like hide the delete button for children images The crawler part You can crawl your site to have better accuracy in the “not usage found” found HOW TO USE IT This plugin is like “one-shot usage”, you should do: In only one day (you can take one day without making news post or page, to make this maintenance activity ) Make one backup of your site (There are good backup plugin in WP) Add one test post or page with test images/files See if the plugin is working and detecting the test images/file are used Delete the unused test files or images See if the test post or page is working as it should If the plugin is working for this test, go with some productions post and page (like the oldest, the least viewed or less important posts or pages) See if the plugin is working and detecting the images/file are used Delete the unused files or images You have two possible result: Working, not working Working Keep going with other images and files, but trying to see if your site still working Delete all unused files/images Normally your site is free of unused files, so you can delete and forget about the plugin Not working restore your site from the backup system Delete the plugin Find another plugin IMPORTANT This plugin can destroy your site IF you don’t know how to use it, YES YOU CAN DESTROY IT!!! This plugin need you to see if is working like it should, take the “not usage found” like inaccurate and go by little steps, see if is working with your WP configuration, plugins, themes, etc. Is very wisely to use one backup system, that take in account your upload folder and database HOW IT WORKS They are some big part of this plugin: the search: it show you all medias in your site, from the database or you upload folder the verification: try to find if the media is used, if all detection fail to find reference, the media will show like is “not usage found”, but again this can be inaccurate deletion: after you chose witch files will be deleted, the plugin will delete it from the database and from your upload folder