WordPress plugin and theme developers often use Transients to store timely information in your database to speed up your site. If you’re in the process of building your site, and you realize that certain elements like popular posts or twitter widgets are not changing, then you probably tried emptying your cache only to realize that doesn’t do anything. In this article, we will show you how to manage and delete transients in WordPress without going into your database.
What is Transients?
Transients API allow developers to store information in your WordPress database with an expiration time. This help speeds up your site and keep your server load down.
For example in our Floating Social Bar plugin, we retrieve and store social media counts for posts. We also use transients to have the counts update every 30 minutes.
If we don’t use transients, then your server will need to connect with all social networks on each page load which will slow down your site significantly.
That’s why transients are awesome.
So why would you ever want to manage or delete transients? Well things can go wrong sometimes. Let’s say a connection between facebook and your site didn’t go so well, and now it’s showing a count of 0. You can wait 30 minutes or clear out the transient and get the accurate count.
It also helps when testing a plugin to make sure that it’s really working like it is supposed to. Last but not least, you may want to delete expire transients to clear out your database.
Our friend, Pippin Williamson, recently released a plugin called Transients Manager. This plugin allows you to view, search, edit, and delete transients from your WordPress admin without ever entering the database options table.
Simply install and activate the plugin. Upon activation, it will add a new menu item under Tools » Transients. You can see all your transients listed there.
Now while his plugin allows you to view, search, edit, and delete individual transients, it doesn’t have the ability to bulk delete expired transients.
Often when transients get expired, they stay in the database. If you want to clean up your wp_options table, then you can use this plugin called Delete Expired Transients.
Once you install and activate the plugin, it will add a new menu item under Tools » Delete Transients. On that page, it will show you the expired transients and the total number of transients. You can easily bulk delete expired transients from this screen.
We hope this article helped you manage and delete transients in WordPress without ever entering your database.