User Tools

Site Tools


How to Manage WordPress Users

How to Reset a WordPress User Password using SQL?

You can quickly set a user your new password to the ‘somenewpassword’ text below, assuming that the user login is ‘theirusername’. Change the username and password to whatever you’d like and execute the query.

  UPDATE wp_users 
  SET user_pass = MD5( 'somenewpassword' ) 
    WHERE user_login = ‘theirusername’;

How to Get a List of Subscribers?

The below example will get a list of registered users who are assigned the role of subscriber:

  SELECT wp_users.ID, wp_users.user_nicename, wp_users.user_email
  FROM wp_users 
  JOIN wp_usermeta ON wp_users.ID = wp_usermeta.user_id 
    WHERE wp_usermeta.meta_key = 'wp_capabilities'
      AND wp_usermeta.meta_value like '%subscriber%'
  ORDER BY wp_users.user_nicename;
resources/manage-wordpress-users.txt · Last modified: 2020/05/28 14:30 by Karson N.