Created
          December 19, 2014 22:42 
        
      - 
      
- 
        Save trepmal/1c66dbe97e8f322bc107 to your computer and use it in GitHub Desktop. 
    wp-cli: reset all user passwords
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| for uid in $(wp user list --field=ID) | |
| do | |
| pass=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32}` | |
| wp user update $uid --user_pass="$pass" | |
| done | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment