Do your research. Spicy jatropha, which doesn't appear on anyone's lists, is irresistible to many butterflies in southern California. Pay attention to plants that butterflies land on in nurseries and public gardens and plant the same ones.
Shallow puddles are good also.
Any insecticide that rids your garden of pests will kill butterflies, too. The life cycle of a butterfly is fascinating. The female selects the food or host plant relevant to her species. On the leaves or stem of her selected plant she lays upwards of 300 eggs. Those which hatch become caterpillars, which spend all their days chewing voraciously through their host plant foliage.