Get version of Drupal, Joomla and Wordpress sites

#!/bin/bash echo "Drupal Sites" echo "************" find -type f -iwholename "*/modules/system/system.info" -exec grep -H "version = \"" {} \; echo " " echo "Wordpress Sites" echo "***************" find -type f -iwholename "*/wp-includes/version.php" -exec grep -H "\$wp_version =" {} \; echo " " echo "Joomla Sites" echo "************" find . -type f \( -iwholename '*/libraries/joomla/version.php' -o -iwholename '*/libraries/cms/version.php' -o -iwholename '*/libraries/cms/version/version.php' \) -print0 -exec grep "RELEASE[[:space:]]*=\|DEV_LEVEL[[:space:]]*=" {} \; echo " " echo "+++" echo "Alternate method for Joomla (language file)" echo "*******************************************" find . -type f -iwholename "*/language/en-GB/en-GB.xml" -exec grep -H "<version>" {} \;; echo "+++"
Get the version of your site (sites) from the command line.
Save the file as cms_version.sh, copy to document root directory and add execute permission.

Example output:
/var/www$ ./cms_version.sh
Drupal Sites
************
./drtest/modules/system/system.info:version = "7.41"
./html/drtest/modules/system/system.info:version = "7.44"
./html/drupal/modules/system/system.info:version = "7.44"
./html/2/modules/system/system.info:version = "7.44"
./html/d8/modules/system/system.info:versio

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.