WordPress.org

Ready to get started?Download WordPress

Forums

WP CleanFix
Add this to your plugin ! (1 post)

  1. Julio Potier
    Member
    Posted 1 year ago #

    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 !

    http://wordpress.org/extend/plugins/wp-cleanfix/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.