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](https://github.com/dartiss/[repo link] “Github”) 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×1.97%
- wordpress8×1.57%
- expired6×1.18%
- options5×0.98%
- cleaning4×0.79%
- table4×0.79%
- added3×0.59%
- code3×0.59%
- data3×0.59%
- database3×0.59%
- expired transients3×0.59%
- github3×0.59%
Country Caching Extension
DUE TO PERSONAL CIRCUMSTANCES I AM NO LONGER ABLE TO DEVELOP OR SUPPORT THIS PLUGIN. IF YOU ARE INTERESTED IN ADOPTING THIS PLUGIN SEE https://developer.wordpress.org/plugins/wordpress-org/take-over-an-existing-plugin/ Solves wrong country content for visitor Geo-Location issues. Enables Comet Cache to display the correct page and widget content for a visitor’s country. Bonus also makes Cookie Notice work correctly with Comet Cache (whether using country/EU geolocation or not). If you need country caching with other caching plugins then see “Advice” below. This plugin adds an extension to Comet Cache enabling it to create separate snapshots (cache) for each page based on country location. Extra caching can be restricted to specific countries and/or a group of countries. E.g. if you are based in the US but show different content to Canadian,Mexican & EU country visitors, you can set separate caching for CA & MX visitors + single group cache for EU visitors; the remainder of your visitors will standard cache (“US”) content. It works on normal WordPress and on Multisite (see FAQ). Comet Cache is designed to work with add-on scripts and should work seamlessly with this plugin. Identification of visitor country for caching Via Cloudflare or Maxmind. (this product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com ) It is also possible to connect a different GeoLocation sytem of your choice (see documentation). If you use Cloudflare and have “switched on” their GeoLocation option ( see Cloudflare’s instructions ) then it will be used to identify visitor country. If not, then the Maxmind Country Database will be used. Updating (If not using Cloudflare for country) The installed Maxmind Country/IP data file will lose accuracy over time. To automate a monthly update of this file, install and enable the Category Country Aware (CCA) plugin (Country Caching and the Cataegory Country Aware (CCA) plugins use the same Maxmind data file in the same folder and the CCA plugin includes code for its update). The CCA plugin has many other features and functionality you may find useful. Alternatively you can manually update (FAQ below). Additional Info and support ADVICE: Don’t use ANY Caching plugin UNLESS you know how to use an FTP program (e.g. Filezilla). Support forums show that Caching plugins including Comet Cache can result in “white screen” problems for some users; the only solution may be to delete files using FTP/Cpanel or OS command line. The Country Caching plugin deletes files on deactivation/delete, but in “white screen” situations you may have to resort to “manual” deletion – see FAQ for instructions. WP Super Cache: is also designed to work with “add-ons” and an equivalent of this plugin is available in the WordPress repository. W3 Total Cache does not currently provide a suitable hook for plugin country caching. Others have requested this facility. License This program is free software licensed under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. In particular please note the following: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.