Butterfly populations have been decreasing due to habitat loss, climate change and pesticide use. Butterflies are very important for pollination.
Many species of butterfly require overripe fruit to supplement their diets. Decaying fruits have carbohydrates and minerals that most butterflies need. Help butterflies thrive by doing the following:
Place a large plate or dish outside with another smaller dish within it. Fill the outer larger dish with enough water to keep ants from the smaller dish. Place overripe fruit on the smaller plate cut in sections so they are easy to feed upon. Don't smash the fruit so the butterflies do not become stuck accidentally. Instead simply slice fruit pieces you would otherwise throw out and place them on the smaller plate. It will help the butterflies thrive! It is best to replace the fruit pieces either daily or when the fruit has begun to rot. No longer than a couple of days at a time however.
Source - Homesteading Self Sufficiency Survival