Last active
July 16, 2019 14:27
-
-
Save ElliottLandsborough/35cf328dbc8432eaf5f62f85259fe259 to your computer and use it in GitHub Desktop.
Bash script to check all wordpress versions
This file contains 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 | |
LATEST_WORDPRESS=`curl -s http://api.wordpress.org/core/version-check/1.5/ | head -n 4 | tail -n 1` | |
find /home | grep "wp-includes/version.php" > /tmp/wplist1 | |
for f in $(cat /tmp/wplist1); do | |
ver=$(grep "wp_version =" $f | cut -d\' -f2); | |
if [ "$ver" != "$LATEST_WORDPRESS" ]; then | |
echo "$ver - $f"; | |
fi; | |
done | |
rm -rf /tmp/wplist1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment