Yucca prefers dry to average well-drained soil in full sun. If the soil doesn't drain well, the plant may suffer from rot problems. If you have clay soil, yucca isn't a good plant for your garden. Instead, try it in a container or a raised bed filled with well-drained potting mix. If you have average soil, your yucca may do all right if you avoid overwatering it. Planting it on a sunny, south-facing slope may help create the drier conditions that it enjoys.