title: MySQL automated transient removal for wp_options
body: <p>I have been scanning through the Internet, but I find only answers how to manually clear transients from <code>wp_options</code>, not automatically.</p>
  
  <p>It involves a shop with around 40-60 orders a day, and creates easily 250K new transient records every week. The <code>wp_options</code> database is bloaded and page load time becomes a drama. So every week I have to dig into the MySQL to run </p>
  
  <pre><code>DELETE FROM `wp_options` WHERE `option_name` LIKE ('%\_transient\_%')
  </code></pre>
  
  <p>to reduce the size from 115MB to 3MB. But I'd rather see an automation of that.</p>
  
  <p>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 <code>wp_options</code> first and a deletion afterwards?</p>
  
  <hr>
  
  <p>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.</p>