As mentioned, milkweed, oregano, verbena, wallflowers and dill are all guranteed to attract butterflies to your backyard. But other plants that butterflies are known to enjoy include lavender, cornflower, honeysuckle, cosmos, chrysanthemum, snap dragon and black-eyed susan to name just a few flowers.
They also like to feed on weeds and wild flowers such as stinging nettles, daisies and clover. So avoid using herbicides on lawns or borders, or spraying pesticides near flower beds (or anywhere else).