Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save QuentinMoss/38cee6c8287c8b2e291b to your computer and use it in GitHub Desktop.
Save QuentinMoss/38cee6c8287c8b2e291b to your computer and use it in GitHub Desktop.
Locate and sort all WordPress installations by version
# Obviously requires locate. Swap locate with find on RHEL, or..
# yum install -y -q bash-completion finger mlocate && . /etc/bash_completion && updatedb &
locate wp-includes/version.php | xargs grep -H "wp_version.*=" | sort -k 3 | awk '{print $3 " " $1}' | sed -e "s/:.*//" -e "s#/wp-includes.*##"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment