The Flat-leaved Parsley (Petroselinum crispum var. crispum 'Neapolitanum') pictured in the OP is not wilting. Its leaves are only leaning in different directions. Parsley is easy to grow in full sun in well-drained soil with regular irrigation. In a container, fertilize occasionally with a complete, liquid fertilizer.
Petroselinum is a small genus of one to three biennial herbs, in the Celery Family (Apiaceae). The most well-known species is Parsley
(Petroselinum crispum var. crispum), which is grown worldwide as a culinary herb and garnish. There are both crisped and flat-leaved forms. Giant Parsley (Petroselinum crispum var. giganteum), is a large form native to Morocco and Algeria, though it may be extinct in the latter country.
Corn-Parsley, native to western Europe is sometimes include in this genus as Petroselinum segetum, though some recent treatments now place it in the genus Sison, as Sison segetum.