adjusted wordpress, partially forked from opscode's version