WP ULike stores data in many databases tables. You can read more about optimizing and repairing WP ULike database tables, but here are the 3 simple steps to reset vote counts.

Step 1

Add the following code snippet in your theme’s functions.php.

/**
 * Reset the votes for WP ULike.
 *
 * All the staticstics will be deleted. No settings will be deleted.
 *
 */
add_action( 'admin_init' , 'wp_ulike_reset_votes' );

function wp_ulike_reset_votes() {

    global $wpdb;
 
    $wpdb->query( "TRUNCATE TABLE wp_ulike" );
    $wpdb->query( "TRUNCATE TABLE wp_ulike_activities" );
    $wpdb->query( "TRUNCATE TABLE wp_ulike_comments" );
    $wpdb->query( "TRUNCATE TABLE wp_ulike_forums" );
    $wpdb->query( "TRUNCATE TABLE wp_ulike_meta" );
}


Step 2

Reload your admin dashboard.

Step 3

Remove the code snippet added in your theme’s functions.php in step 1.


That’s all.


Note the Pro version of WP ULike has a built-in feature under WP ULike Pro > Developer Tools > Optimization to reset vote counts.

Get WP ULike Pro.


Did you know? You can send an email notification to the post author whenever they get a LIKE on their content

Email Notifications For WP Ulike
3 simple steps to reset vote counts of WP ULike plugin
Tagged on:     

Leave a Reply

Your email address will not be published.

Pin It on Pinterest