Loosen the soil in an area with quick-draining soil that receives at least six hours of direct sunlight daily. Sandy and rocky soils work well for yucca plants since they mimic the conditions of the desert. Break up any large soil clumps and remove large rocks.
Spread a 6-inch layer of sand over the soil if the soil is rich or full of clay. Mix this into the top 18 inches of the soil with a shovel. Rake the surface of the soil smooth and level.
Dig a hole that is only as deep as the container the yucca is growing in and twice as wide. Scrape the sides of the hole with the edge of the shovel to loosen the soil and prevent soil compaction.
Tip the yucca plant on its side and ease it out of its container. Place the roots in the hole and spread them out so they grow towards the walls of the hole. Fill the hole with soil and pack it around the roots every few inches to hold the yucca plant in place.
Soak the soil to the depth of 1 inch with water. Yucca plants need water each week while they are growing new roots. Once new growth begins, then the yucca becomes drought tolerant.