Find the version number of all WordPress installations on your Linux server.

I have a lot of customers running WordPress on our shared hosting servers, and sometimes they neglect to update their WordPress installs. [Rolls Eyes]

I need to know which of these sites are using an obsolete version of WordPress so I may contact the customer and warn them that they need to update their software.

So here’s a helpful little Linux command I whipped up and ran as root to go through my /home folder searching for all WordPress versions. I only had to run it as root because I am checking through all users’ folders, not just my own. If you only want to check your own user, you don’t need root access.

I ran this command from my /home folder on the Linux server:

find . -name 'version.php' -exec grep '$wp_version =' {} /dev/null \; > /tmp/wordpress-versions.log

Breakdown:

  • find . -name ‘version.php’
    Search through the current folder, recursively, for any file named version.php. This is where WordPress stores the WordPress version number.
  • -exec
    Execute a command with each found item.
  • grep ‘$wp_version =’ {}
    Look within the found version.php file(s) in a loop for the term $wp_version = and output the result.
  • /dev/null
    Trick grep into thinking there is a second file, forcing it to precede the output with the filename provided by find
  • \;
    Close the find command.
  • > /tmp/wordpress-versions.log
    Save the results to a log file in /tmp. You can tail -f this file while scanning, or simply open or cat it when you’re done. Leave this portion out of the command if you’d rather have it output directly to your screen.

We want YOU in our next music video.

Category5 TV is shooting its latest music video, and we want you to be in it!

All you have to do is shoot video of you dancing through the entire song, “Happy” from Pharrell Williams. NO, you do not have to be a good dancer for this! That’s part of the fun!

Then, upload your video (we prefer HD if possible) to your favorite cloud storage service (PogoPlug, DropBox, etc) and email a link to live@category5.tv – we will contact you at that point with more details.

Here’s the music and style you’ll want to follow:

Looking forward to your submission!

Submission deadline is Tuesday April 29, 2014 Extended to Tuesday May 6, 2014.

– Robbie

We’re on Roku!

We’re on Roku! Add Category5 to your Roku channel lineup by visiting http://cat5.tv/rokuchannel.