Hosting Question? Find the Solution -


Browse our Guides, Articles, and How-To's

How to Manage WordPress Users

Category: WordPress
Tags: # # # # #

How to Reset a WordPress User Password using SQL?

You can quickly set a WordPress users password to the new ‘somenewpassword’ text as seen 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;

Are you looking for help with something else? KnowHost offers knowledge base articles to help you with any other questions you have about your server.