Support » Plugin: WP CleanFix » Add this to your plugin !

  • Hello !

    I suggest you to add this option in your awesome plugin :
    “Delete expired transients” because some expired transient can always exists even if their lifetime is outdated.

    This is the query to run :
    $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN (SELECT CONCAT('_transient_',SUBSTRING(option_name,20,44)) FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_%' AND option_value < UNIX_TIMESTAMP() AND LENGTH(option_value)=10 UNION SELECT CONCAT('_transient_timeout_',SUBSTRING(option_name,20,44)) FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_%' and option_value < UNIX_TIMESTAMP() AND LENGTH(option_value)=10)

    Thank you !

  • The topic ‘Add this to your plugin !’ is closed to new replies.