Basil needs 6 to 8 hours of sun; in the South and Southwest, it benefits from afternoon shade.
Set out transplants at least 2 weeks after the last frost in spring; summer planting is okay, too. Space at the distance recommended on the label, which is generally 12 to 18 inches apart. Plants are very frost sensitive, so keep transplants protected in case of a late cold spell.
Basil likes rich, moist, but well-drained soil with a pH of 6 to 7. Because basil is harvested continually for lots of leaves, it needs a little fertilizer. When planting, add a coated, slow-release fertilizer such as 19-19-19 at the rate recommended on the label, or work plenty of organic nutrients from compost, blood meal, or cottonseed meal into the soil. Be sure to keep the soil moist. Dry soil stunts its growth.
In containers, use a large pot to keep the plants from drying out quickly in hot weather. Also use a water-retaining polymer in the potting soil to keep the soil evenly moist and extend the time between waterings.