WordPress: How to Selectively Remove Users’ wp_usermeta Data with SQL Command

DELETE FROM wp_usermeta WHERE user_id NOT IN(SELECT ID FROM wp_users WHERE user_login IN ('admin','second_user_to_keep','etc'))

One comment

Leave a Reply

Your email address will not be published.

top