Drainage is the whole job
A retaining wall holds back soil and the water in it. Walls fail when water pressure builds up behind them, so drainage aggregate, a drain line and weep outlets are as important as the wall itself.
Engineering and permits
Taller walls, walls supporting a driveway or structure, and walls near property lines often require engineering and a building permit. Height thresholds and rules vary by city, and are confirmed for each project.