Refactor wp command to use site factory