How to Clear Transients and Object Cache in WordPress
You change a plugin setting, refresh the page and nothing happens. An old price still shows, a widget displays stale data or a feed refuses to update. Often the culprit isn’t the page cache but WordPress’s own internal cache: transients and the object cache. Knowing how to clear transients in WordPress safely solves a surprising number of “why isn’t this updating?” problems.
In this guide, you’ll learn what transients and the object cache are, when clearing them helps, how to clear them with a plugin or WP-CLI, and when you shouldn’t bother.
What Are Transients?
Transients are temporary pieces of data that WordPress, plugins and themes store so they don’t have to recalculate or re-download them on every page load. Examples include:
- Results from external APIs, such as social feeds or exchange rates.
- Calculated values, such as product counts or related posts.
- Update checks for plugins and themes.
Each transient has an expiry time. By default they’re stored in the wp_options database table. If your host provides a persistent object cache such as Redis or Memcached, transients live there instead.
What Is the Object Cache?
The object cache stores the results of database queries in memory so repeated requests are faster. Without a persistent cache it only lasts for a single page load; with Redis or Memcached it persists between requests and can hold stale data after changes.
When Clearing Transients Helps
| Symptom | Likely fix |
|---|---|
| Plugin setting changes don’t appear | Clear transients and object cache |
| Social or API feed shows old content | Delete that feed’s transient |
| Plugin update notices are wrong | Clear transients |
Thousands of expired rows in wp_options |
Delete expired transients |
| Page looks old to visitors only | Clear page cache and CDN instead |
How to Clear Transients With a Plugin
One-Click Transient Flusher from Simpli Plugin is a free plugin that adds a button to the WordPress admin top bar for clearing the object cache and transients in one click, without digging through settings screens.
- Download the plugin ZIP from its product page.
- Go to Plugins → Add New Plugin → Upload Plugin.
- Upload the file, click Install Now, then Activate Plugin.
- Click the flush button in the admin bar whenever you need a clean slate.
Seeing stale data that clearing caches doesn’t fix? Simpli Plugin’s team builds custom caching and performance solutions for WordPress and WooCommerce.
How to Clear Transients With WP-CLI
If you have SSH access, WP-CLI gives precise control:
# Delete only expired transients
wp transient delete --expired
# Delete all transients
wp transient delete --all
# Flush the object cache
wp cache flush
Deleting expired transients is always safe. Deleting all of them is also safe in principle, because plugins recreate what they need, but expect slightly slower page loads for a few minutes while caches rebuild.
Clearing Transients Safely
- Prefer expired-only cleanup for routine maintenance.
- Flush everything during quiet hours on busy stores, since the first requests afterwards do extra work.
- Clear the right layer. If visitors see old pages, the page cache or CDN is the issue, not transients.
- Don’t flush on a schedule without a reason. Caches exist to make your site faster.
Common Problems and How to Fix Them
The Same Problem Comes Back
A plugin may be caching data incorrectly. Note which plugin’s data goes stale and check its settings or contact its developer.
The Site Is Slow Right After Flushing
This is normal. Caches rebuild as pages are visited, and speed returns to normal shortly.
Thousands of Transients Reappear
Some plugins create many transients by design. If wp_options keeps growing, consider a persistent object cache from your host.
Related Guides
- How to Clean Up Your WordPress Database Safely
- How to Remove Query Strings From Static Resources in WordPress
- How to Add a Staging Environment Indicator in WordPress
Frequently Asked Questions
Is it safe to delete transients?
Yes. Transients are temporary by design and are recreated when needed.
Will clearing transients log users out?
No. User sessions aren’t stored as transients, so logged-in users stay logged in.
What’s the difference between transients and page cache?
Transients store pieces of data used to build pages. The page cache stores finished pages. They’re cleared separately.
Fix Stale Data in One Click
When changes don’t show up, transients and the object cache are worth checking before you start debugging. Clear them safely, clear the right cache layer and keep routine cleanups to expired transients.
Download One-Click Transient Flusher for free, and browse the full Simpli Plugin library. If you need help with performance, our developers can help.