Scripting

Find outdated versions of WordPress and Joomla on your server

Find outdated versions of WordPress and Joomla

The outdated versions of WordPress and Joomla cause many security issues on the server. You can see there is an increase in the number of WordPress and Joomla websites being hacked. In order to prevent this issue at some extent, it is important to keep the WordPress and Joomla updated.

If you have a server and many sites running on it, it is difficult that to find which accounts are using the outdated WordPress/Joomla. The below scripts helps you to find outdated versions of WordPress and Joomla on your server.

cPanel Server:

Find outdated versions of WordPress:

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

Find outdated versions of Joomla:

 
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 "-"

Find Outdated Drupal Versions:

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

Plesk Server:

Find outdated versions of WordPress:

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

Find outdated versions of Joomla:

 
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 "-"

Find Outdated Drupal Versions:

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

That’s it!

Also ReadFix – WordPress XMLRPC Vulnerability

If you like the post and wish to receive more articles from us, please like our FB page: If you like this post and wish to receive more articles from us, please like our FB page: Button

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at info@grepitout.com

Topics