WordPress Snippets at WPcustoms

Reset your username password

Adding this to your theme’s function will change the specified usernames password. Handle with care but in case you somehow locked yourself out of your WP admin area and do not want to mess with the database – this maby be a solution.


/**
 * Snippet Name: Reset your username password
 * Snippet URL: https://wpcustoms.net/snippets/reset-username-password/
 */
  UPDATE 'wp_users' SET 'user_pass' = MD5('MY_NEW_PASSWORD')
WHERE 'wp_users'.'user_login' ='YOUR_USER_NAME' LIMIT 1;