With the Transients Manager plugin, you as a WordPress developer or interested user can easily view, edit and delete all WordPress transients. A brief introduction to the useful plugin.
What are transients
The WordPress Transients API is a simple way to save elaborately generated data in the database and reuse it as a cache. For example, it is advisable to cache the results of complex database queries or access to external APIs (e.g. Twitter, Facebook) in the database.
When the page is called up again, the cached data from the database is used and the original performance-intensive generation of the data is avoided. This often increases the performance of the website significantly and many themes and plugins therefore often use WordPress transients.
WordPress transients work in a similar way to options and therefore also consist of a name and value (key-value store). In addition, transients are given an expiry date by which they are deleted at the latest .
The Transients Manager plug-in that has now been introduced is particularly useful for WordPress developers when developing and testing transients, because created transients can be quickly displayed, edited and deleted.
The Transients Manager is available for download in the WordPress plugin directory. The plugin comes from Pippin Williamson, a very experienced WordPress plugin developer who is best known for its Easy Digital Downloads and AffiliateWP plugins.
Provides a UI to manage your site's transients. You can view, search, edit, and delete transients at will.
Show WordPress Transients
After activating the plugin, all WordPress transients can be viewed under Tools → Transients .
In addition to the designation, the value and the expiry date of the transients are displayed. In the case of objects and arrays as values, unlike strings, the content is not displayed directly in the table due to its length - however, the display of the complete value is available under Edit.
Individual WordPress transients can be deleted or edited with the actions. The name, value and expiry date can be changed.
Delete WordPress transients
There are also a number of buttons above the transients table. This means that all transients, transients with an expiration date or transients that have already expired can be removed from the database with one click.
Expired transients can be deleted without hesitation. The plugin is therefore also suitable to clean up the wp_options table of the WordPress database and to remove transients that are no longer required.
In principle, deleting all transients is no problem as long as all active plugins are properly programmed. If necessary, the transients are simply created again, but the database has been cleared of all transients that are no longer required.
But before unsuspectingly clicking delete on a live website, it is advisable, as always, to have a backup ready. In the event that the website no longer works as it should.
Block transients and disable transient caching
When using WordPress transients in your own themes and plugins, the plugin is a very useful aid for quickly analyzing and debugging created transients.
A great feature for developers is the ability to block the creation of transients. The feature is available through a link in the WordPress toolbar.
After activating the function, no more transients are created and updated, which practically deactivates the complete transient caching of WordPress.
The development and debugging of functions with transient caching is made much easier because database queries and connections to external APIs are executed anew with each call instead of using cached data.