3 Comments

  1. Very nice written script. Thanks for sharing, Phil.
    I adapted one for serverpilot users, shared it on github here:
    https://gist.github.com/liuyigh/34868d44c248d87887c145949e5c164d

  2. This script would be really useful for me if it could parse a remote list of many servers and connect to them each.

    (I’m looking for a way to bulk change passwords across many servers rather than update WordPress core or plugins.)

    eg: Read list from: https://github.com/org/repo/MyWebsites.txt

    ““
    123.321.00.01
    321.123.00.02
    432.321.00.03
    567.890.00.04

    ““
    and run “wp user update myusername –user_pass=abc123“

    1. Hi Jay,

      You could look at orchestration tools like Ansible, or else a simple bash script would do it. Something like:
      while read p ; do ssh ${p} ‘cd /var/www/ && wp user update myusername –user_pass=abc123’ ; done

Leave a Reply

Your email address will not be published. Required fields are marked *