⚡ Target:
phpMyAdmin / WP-CLI db query
🔒 Tested: MySQL 8.0+ / MariaDB 10.4+
💻 Lang: SQL
⚠️ Database Table Prefix Reminder: This query uses the standard
wp_ table prefix (e.g. wp_options, wp_postmeta). If your installation uses a custom table prefix (configured in wp-config.php, e.g. wp_a7b_), be sure to replace wp_ with your custom prefix before running this query.
Expired transients often accumulate into tens of thousands of unused rows in wp_options, inflating database backup size and slowing autoloaded options. This SQL query safely purges expired transients.