You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transients are the result of a form of caching that can happen in the WordPress database with the results of remote API calls. This option could clears all of the expired transients from the database.
Introduce a modal that would check and clean transient options
@merkys7 Thank you for this suggestion! Can you clarify that your intention here is that this would be a button or some other kind of option within the Performance Lab plugin settings?
Thanks @merkys7! This would be a new plugin module, then. To move this forward, the next step would be to revamp this issue to become a proper module proposal. See the following documentation:
Once the details noted above are added to this issue, we can discuss this with the broader team in a future performance chat. Let me know if you have any questions. Thanks!
Nothing to contribute other than I suspect this is the cause of a client's site with a 159GB options table. I can Optimize the table every few days but finding this thread eases my mind that I won't have to do it ongoing :)
Can we clarify what's being proposed here? As Pete mentioned, there's already a daily cron event which clears out expired transients.
What exactly is the problem looking to be solved?
I'm not sure I'm keen on adding a button to clear out all transients, or large transients, because a user needs to be able to make an informed decision about whether to click it, and it can cause cache stampedes on subsequent page requests as transient values are repopulated and re-cached.
Reacted by Daniele Scasciafratte and Pascal Birchler
Can we clarify what's being proposed here? As Pete mentioned, there's already a daily cron event which clears out expired transients.
What exactly is the problem looking to be solved?
I'm not sure I'm keen on adding a button to clear out all transients, or large transients, because a user needs to be able to make an informed decision about whether to click it, and it can cause cache stampedes on subsequent page requests as transient values are repopulated and re-cached.
I agree it isn't clear the focus of this ticket.
Maybe can be more interesting to get the list of the most huge transients that are in autoload as example, usually it is something that I do when I am try to check the performances to see if some plugins is doing badly something.
So, expired transients are already automatically deleted by WordPress, and we already have #526 to optimize autoloaded options, so I don't think anything really needs to be done here.
Activity
mxbclang commentedon Jun 3, 2022
@merkys7 Thank you for this suggestion! Can you clarify that your intention here is that this would be a button or some other kind of option within the Performance Lab plugin settings?
merkys7 commentedon Jun 4, 2022
I think we could display transient count / size in site-health checks using SQL query
and a button to clean it using SQL query
tillkruss commentedon Jun 6, 2022
It'd be interesting to see the bytes as well.
peterwilsoncc commentedon Jun 8, 2022
WordPress has an existing function for the query above,
delete_expired_transients(), that ought to run daily on a scheduled task (ref).Something in site health to delete expired, all, or auto-loaded transients would be lovely if they get large.
mxbclang commentedon Jun 13, 2022
Thanks @merkys7! This would be a new plugin module, then. To move this forward, the next step would be to revamp this issue to become a proper module proposal. See the following documentation:
Once the details noted above are added to this issue, we can discuss this with the broader team in a future performance chat. Let me know if you have any questions. Thanks!
merkys7 commentedon Jul 14, 2022
Thank you @bethanylang I will begin working with it shortly
JoelEadeDesign commentedon Jul 23, 2022
Nothing to contribute other than I suspect this is the cause of a client's site with a 159GB options table. I can
Optimizethe table every few days but finding this thread eases my mind that I won't have to do it ongoing :)[-]Clean transient options (wp_options table)[/-][+]Module proposal: Clean transient options (wp_options table)[/+][-]Module proposal: Clean transient options (wp_options table)[/-][+]Module Proposal: Clean transient options (wp_options table)[/+]johnbillion commentedon Mar 13, 2023
Can we clarify what's being proposed here? As Pete mentioned, there's already a daily cron event which clears out expired transients.
What exactly is the problem looking to be solved?
I'm not sure I'm keen on adding a button to clear out all transients, or large transients, because a user needs to be able to make an informed decision about whether to click it, and it can cause cache stampedes on subsequent page requests as transient values are repopulated and re-cached.
Mte90 commentedon Apr 2, 2023
I agree it isn't clear the focus of this ticket.
Maybe can be more interesting to get the list of the most huge transients that are in autoload as example, usually it is something that I do when I am try to check the performances to see if some plugins is doing badly something.
swissspidy commentedon Jan 27, 2025
So, expired transients are already automatically deleted by WordPress, and we already have #526 to optimize autoloaded options, so I don't think anything really needs to be done here.