I have been scanning through the Internet, but I find only answers how to manually clear transients from wp_options
, not automatically.
It involves a shop with around 40-60 orders a day, and creates easily 250K new transient records every week. The wp_options
database is bloaded and page load time becomes a drama. So every week I have to dig into the MySQL to run
DELETE FROM `wp_options` WHERE `option_name` LIKE ('%\_transient\_%')
to reduce the size from 115MB to 3MB. But I'd rather see an automation of that.
Some plugins for wordpress have the option to auto delete transients, but it's not picking up all the transients, only 5%. Is there a MySQL or server way to make an auto execution every 24H for example, that includes a backup of wp_options
first and a deletion afterwards?
I do not agree with the marked duplicate article, as it doesn't show how to run a backup and a deletion for a certain time frame for wp_options.