Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Manage and Delete Transients in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Manage and Delete Transients in WordPress

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.

Transients Manager

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.

Delete Transients in WordPress

We hope this article helped you manage and delete transients in WordPress without ever entering your database.

If you liked this article, then consider subscribing to our YouTube channel and follow us on Twitter.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Daniel says:

    Hi, great post! I am using Transients in the same way–for social media share counts. Using the Answer posted here:

    Everything is working, however it is not giving me accurate share counts for all of the posts. Some have the correct share count others just show what appears to be a random number. For example a post that has 65 facebook likes only shows 1 when the transient code is added. When I remove the Transient it shows the accurate number of shares for all of them. Any ideas of what could cause this?

    Anything that could point me in the right direction would be appreciated.

  2. Matthias says:

    Hey there,

    how would one bulk delete transients which are not needed but also do not have any expiration date?

  3. Nicolai says:

    Great post! This helped me clear about 300 megabytes from my wp_options table! I still have thousands of entries in there, many with no expiration date. I have a feeling that most are not needed. How do I go about finding out? For example, I have hundreds like these: “wc_max_related_3461814294618….” They have no expiration so will conceivably be there forever! What is the worst that could happen if I delete ALL transients?

  4. gWorldz says:

    Pippin Williamson’s Transients Manager now has a bulk deletion option for expired transients negating the need for Delete Expired Transients. It does not offer the ability to delete all transients but this is probably for the best for beginners and inexperienced users o.O

  5. RW says:

    @wpbeginner, great post! This is one area where wordpress, for some reason, doesn’t clean up after it’s self. I just use this simple SQL in phpmyadmin DELETE FROM `wp_options` WHERE `option_name` LIKE ('%_transient_%') and replace wp_options with whatever my options table has been renamed to. Takes 30 seconds….

    I like the idea of being able to do this through admin of the site, but sometimes I feel I have too many plugins already.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.