A butterfly's goal in life is to lay more eggs. When they emerge from their chyrsalis they are full grown and only seek food for the energy to fly. Therefore, butterflies are attracted to food sources and host plants suitable for laying their eggs on. Host plants are the ones that the caterpillar will feed on until it is time for it to make it's chrysalis.
Butterflies also like to puddle .
They like to land on a muddy area and sip the water and minerals. This can be accomplished by hanging a bucket of water with a small hole in it over a sandy area. Rocks are used by the butterflies as as a place to bask in the sun, their wings need to be warmed to fly. Never use insecticides in your garden. Birds Provide them with water, sheleter, and food and you will have a habitat for birds.