Rosemary needs high-drainage soil, and wilts under excess moisture. To facilitate this, add a coarse material such as gravel, grit, perlite, or sand into the soil. Incorporating these larger particles breaks up dense areas of soil and avoids compacted layers, improving air circulation and increasing drainage. When it comes to soil (especially in container gardening, when the plant is unable to pull nutrients or moisture it needs from the surrounding earth), cultivating healthy, high-production rosemary means nailing the right conditions.