WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My site currently has an outrageous 500k+ transient records in the wp_options table. This causes the table to be crashed frequently and so be my site.

I thought transient records will all expired after some time. I'm not sure which plugins are responsible and what went wrong yet. However, I don't want my site to crash frequently like this. The number of records in wp_options table has grossly increased to 200k+ a few weeks ago and now 500k+.

Should I only delete the %transient_timeout% records - 200k+ of them at the moment?

Any help would be greatly appreciated.

Updates on 16th July 2012

I actually took risk (I backed up my site first) by deleting all the transient records and my site's database hasnt' crashed ever since :)

Thanks again, everyone!

share|improve this question
up vote 3 down vote accepted

This is a fairly definitive set of responses about transients

WPSE: Are transients garbage collected?

share|improve this answer
Yes, thanks, I actually referred to that topic as well :) – eric Jul 17 '12 at 11:39

I used:

DELETE FROM `wp_options` WHERE `option_name` LIKE ('%\_transient\_%');

to cleanup with great results :)

(from here http://stackoverflow.com/questions/10422574/can-i-remove-transients-in-the-wp-options-table-of-my-wordpress-install)

share|improve this answer

Transients, as a rule are temporary data. So if the person who coded the use of such data did so properly, you should be fine. My knowledge of the subject is limited, though, and I have not had much experience with them myself.

Your best bet will almost certainly be to back up your database, wipe out the data you don't think you need, then test your site. If your live site is heavily trafficked, be sure to test on a local instance so nobody is affected during testing.

share|improve this answer

Transients are nothing but temporary options, which are kept in the database for a certain period, means they expire once their purpose is over.

For example: The _site_transient_update_plugins transient. It holds the information about the plugins which have updates available. If you delete this transient, and then refresh your dashboard, you'll find it back in your database. So, even if you delete a transient, WP will regenerate it. It won't break your site, but will definitely cause unexpected things to happen! Make sure you backup your DB before deleting any of these transient values.

share|improve this answer

Here's a simple function to clear all transients and timeouts - add extra to fit your needs.

    function clear_transients()

        global $wpdb;

        // delete all "namespace" transients
        $sql = "
            FROM {$wpdb->options}
            WHERE option_name like '\_transient\_namespace\_%'
            OR option_name like '\_transient\_timeout\_namespace\_%'


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.