Foxglove like soil that is deep well drained, moist, and acidic.  They prefer full sun or light shade.  Find a place that isn’t too windy and gets plenty of sun for most of the day.  If your climate is very hot, then semi-shade would be preferable.

Foxglove plants grow best in rich, well draining soil. Caring for foxglove plants will include keeping the soil moist. Apply a thin layer of compost each spring, followed by a 2-inch layer of mulch to retain moisture and control weeds.