remove user_meta data from database for all users

This is a super old post, for all you future readers, you can use the delete_metadata() function to achieve this with a lot less DB overhead:

delete_metadata(
    'user',        // the meta type
    0,             // this doesn't actually matter in this call
    'my_meta_key', // the meta key to be removed everywhere
    '',            // this also doesn't actually matter in this call
    true           // tells the function "yes, please remove them all"
);

Leave a Comment