Mark the side of the cactus facing the sun by tying on a string, so that you can similarly orient the plant in its new location. Exposing a side of the cactus not usually in direct sunlight causes sunburns.
Dig a trench 6 inches away from the base of the cactus and 6 to 12 inches deep, with a shovel. Push the cactus and its root system through the soil, using the shovel. Move some of the dirt away from the roots, to help them through the soil.
Tie a garden hose around the cactus, and lift it to its side. Prune off any damaged roots -- ones that look gnarled or discolored. Lift the cactus onto a wheel barrow.
Place the wheel barrow in the shade for two days, so that the cactus can air out its roots. By allowing the roots to dry out, the cactus heals over any wounds.
Mix one part washed sand, one part potting soil and one part rocks. Dig a planting hole 4 inches deeper than the cactus was planted in its former location, and slightly wider than the root ball. Fill the bottom of the hole with 4 inches of potting soil, to increase drainage.
Plant the cactus in the hole, packing soil around the base. The backfill should only cover the roots. Covering any part of the cactus with soil increases the risk of rot. Water the base of the cactus, and keep it watered twice a week for one month.