I imagine this is your slowest part, yes?

We talked this morning about limiting the depth we search for this file. How about using something like this...

    files = Dir["*/wp-config.php"] + Dir["*/*/wp-config.php"] + Dir["wp-config.php"]
 
Its not the PRETTIEST code in the world, but it should be fast, simple, etc. It will find any file that matches any of the three given patterns. It does assume you're in the directory you want to search, but you could get around that like...

    base_dir = "/srv/myBadAssBlog"
    files = Dir["#{base_dir}/*/wp-config.php"] + Dir["#{base_dir}/*/*/wp-config.php"] + Dir["#{base_dir}/wp-config.php"]