A cracked or leaning garden wall is usually repairable, and the decision depends almost entirely on one question: has the movement stopped?
Establish whether it is still moving
This comes before any repair decision.
Fix marks either side of a crack, or a glass tell-tale, and measure with dates.
Monitor over at least a full year, so summer and winter are both covered. Seasonal movement is very common and is not the same as progressive failure.
Photograph with a scale in shot.
For lean, hold a long level or a plumb line against the face and measure the offset at the top, recorded against a fixed point so it can be repeated.
A wall that moves seasonally and returns is stable. One that moves steadily in one direction is not.
Finding the cause
Look at the foundation first. Dig a small inspection hole at the worst point and see what is there. Shallow or absent foundations are the usual answer on older walls.
Check for trees within influencing distance, particularly on clay.
Check whether the wall is retaining ground, even a modest amount, since that changes everything.
Look for water: a downpipe discharging nearby, a leaking drain, or ground that stays saturated.
Check whether the wall has any movement joints and whether its length suggests it should.
Look at the coping and the damp course, since a wall saturated from above deteriorates from within.
Reading the damage
Stepped cracking following the joints suggests foundation movement.
A crack wider at the bottom indicates settlement below.
A crack wider at the top near a corner is usually expansion, and generally not serious.
Horizontal cracking and bulging on a retaining wall means it is bending under pressure, which is serious.
Cracks through the bricks rather than the joints mean the mortar was too strong.
What can be repaired
Stable cracks can be raked out and repointed, or converted into a proper movement joint if that is what the wall lacked.
Helical bar stitching bonds stainless steel bars into raked out bed joints across a crack, tying the masonry back together. It is a well established technique and can be done by a competent person with the right resin.
Spalled or cracked bricks can be cut out individually and replaced.
A section that has moved can be taken down and rebuilt on a proper foundation, tying into the sound work either side.
A missing coping can be added, which frequently halts a slow deterioration.
What cannot
A wall leaning progressively because it has no adequate foundation will not be saved by pointing, stitching or buttressing on its own.
A retaining wall that is bulging should be treated as a safety matter and taken down or professionally assessed, not patched.
Pushing a leaning wall back upright is not a repair and usually collapses it.
Rebuilding a section
Take the wall down in a controlled way, from the top, course by course.
Rack back the sound brickwork at each end so the new work can be bonded in rather than butted against it.
Excavate and cast a proper foundation to the full required depth, tying in level with the existing where possible.
Salvage and clean the old bricks if they are sound and frost resistant, since matching new bricks to old is difficult.
Include a damp course, movement joints where appropriate, and a coping.
Safety
A leaning wall can collapse without warning, particularly after heavy rain.
Fence it off and keep children and pets away until it is dealt with.
Prop it before working on or near it, propping from the direction it is leaning towards.
Never work on the downhill side of a leaning retaining wall.
Masonry is heavy and demolition work drops things. Wear a hard hat, gloves, boots and eye protection.
When to get advice
Any retaining wall showing movement.
Any wall adjoining a highway, a footpath or a neighbour's property.
Anything where the movement is progressive rather than seasonal.
A structural engineer's visit costs far less than a collapse, and a wall that falls onto a pavement or a neighbour is a liability problem as well as a building one.