Supporting multiple Wordpress installs

Here’s a little Perl script that uses some modules off CPAN to :

  • Find the names and document-root of each website configured on your server
  • Find the version of Wordpress (if any) for each website, and the Subversion repository version used (if any).
  • Sort these by name, owner UID, or Wordpress version

Rename the .pl.txt file to .pl, chmod a+x so you can run it, and then:

# ./show_wp_versions.pl

which would display, for example,

Domain                         Version    Tracking Subversion  Owner
-----------                    --------   -------------------  -----
alphabetcompany.com             2.8       tags/2.8             alphabet
awkwardaardvark.com             2.7.1     tags/2.7.1           aardvark
brilliant-doorstops.co.uk       2.3                            dumbasapost

-n sorts by numeric version number; -u sorts alpha by UID.

Very handy when you’re supporting a large number of Wordpress installs on a single server, to know who’s running what, and who needs to be updated!

NOTE: To install on a fresh system, you will probably need to:

# cpan
cpan[3]> install App::Info::HTTPD::Apache
cpan[1]> install SVN::Class::Info
cpan[2]> install Apache::ConfigParser