How to find Joomla WordPress or Drupal version from Linux CLI

I was about to rewrite some of these queries again, and decided to google instead.  I found this page with them already written: http://kb.iweb.com/entries/29801848-Verifying-CMS-versions-on-multiple-websites

So this too gets stored away in my cave.  Enjoy:


WordPress version
:

Linux/cPanel:

find /home/*/public_html/ -type f -iwholename “*/wp-includes/version.php” -exec grep -H “\$wp_version =” {} \;

Linux/Plesk:

find /var/www/vhosts/*/httpdocs/ -type f -iwholename “*/wp-includes/version.php” -exec grep -H “\$wp_version =” {} \;

Windows/IIS (default path) with Powershell:

Get-ChildItem -Path “C:\inetpub\wwwroot\” -Filter “version.php” -Recurse | Select-String -pattern “\`$wp_version =”

 

Joomla! 1/2/3 version and release:

Linux/cPanel:

find /home/*/public_html/ -type f \( -iwholename ‘*/libraries/joomla/version.php’ -o -iwholename ‘*/libraries/cms/version.php’ -o -iwholename ‘*/libraries/cms/version/version.php’ \) -print -exec perl -e ‘while (<>) { $release = $1 if m/ \$RELEASE\s+= .([\d.]+).;/; $dev = $1 if m/ \$DEV_LEVEL\s+= .(\d+).;/; } print qq($release.$dev\n);’ {} \; && echo “-“

Linux/Plesk:

find /var/www/vhosts/*/httpdocs/ -type f \( -iwholename ‘*/libraries/joomla/version.php’ -o -iwholename ‘*/libraries/cms/version.php’ -o -iwholename ‘*/libraries/cms/version/version.php’ \) -print -exec perl -e ‘while (<>) { $release = $1 if m/ \$RELEASE\s+= .([\d.]+).;/; $dev = $1 if m/ \$DEV_LEVEL\s+= .(\d+).;/; } print qq($release.$dev\n);’ {} \; && echo “-“

 

Drupal version:

Linux/cPanel:

find /home/*/public_html/ -type f -iwholename “*/modules/system/system.info” -exec grep -H “version = \”” {} \;

Linux/Plesk:

find /var/www/vhosts/*/httpdocs/ -type f -iwholename “*/modules/system/system.info” -exec grep -H “version = \”” {} \;

 

Latest version information:

 

 

Add a Comment

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