A well-built wall lasts a century and costs several times what a fence costs. Most of that cost and most of the durability is below ground and in details that are invisible once finished.
Foundations
The part that determines whether a wall stands.
A concrete strip footing, wider than the wall and of adequate depth, taken down below the level affected by frost and seasonal ground movement.
On shrinkable clay, and near trees, foundations need to go considerably deeper than people expect, since clay shrinks and swells with moisture and heaves a shallow footing.
Inadequate foundations produce the diagonal stepped cracking seen in a great many garden walls.
Thickness and stability
A single-skin or half-brick wall, one brick thick at around a hundred and two millimetres, is inherently unstable and limited in height.
It needs piers at regular intervals, typically every one and a half to three metres, to give it lateral stability.
A one-brick wall, at around two hundred and fifteen millimetres, is far more stable and can go higher.
Height, thickness, pier spacing and exposure are all related, and there is published guidance on free-standing wall design.
Take proper advice on anything above about a metre, on any retaining wall, and on anything in an exposed position. Walls that fail can injure people.
Retaining walls are different
A wall holding back ground carries enormous load, and saturated soil is heavier still.
Anything retaining more than about a metre, or retaining ground near a building or a boundary, needs professional design and engages building regulations.
Drainage behind a retaining wall is essential: free-draining backfill, a geotextile separating it from the soil, and weep holes or a land drain. A wall with no drainage will eventually move.
Materials
Facing bricks must be suitable for external free-standing use, which means frost resistant and of appropriate durability. Bricks intended for house walls sheltered by a roof may not survive in a garden wall exposed on both sides and the top.
Concrete blocks are cheaper and are rendered or faced.
Natural stone is the most attractive and the most skilled to lay.
Use the right mortar. A weaker, more flexible mortar generally performs better than a very strong one, which cracks rather than accommodating movement.
Damp-proof courses
A free-standing wall needs a damp-proof course near the base to stop moisture rising, and many benefit from one under the coping as well.
Where a garden wall abuts a house, do not build in a way that bridges the house damp course or traps moisture against it.
Coping
The single most important detail for longevity.
A coping sheds water off the top of the wall, which is where saturation and frost damage begin.
Use a proper coping stone, bricks on edge, or a purpose-made concrete coping, ideally with a drip or an overhang so water is thrown clear of the face.
An uncapped wall absorbs water through the top and fails within years.
Movement joints
Long runs of walling need provision for thermal and moisture movement, or vertical cracks appear.
Planning
The same rules as fences: generally two metres, reduced to one metre where the boundary adjoins a highway.
Listed buildings and conservation areas may need consent, and a wall may be listed in its own right.
Cost and skill
Bricklaying to a good standard takes practice, and a poorly built wall is both unattractive and unsafe.
Foundations, drainage and setting out are within reach of a competent amateur. The walling itself is worth paying for unless you already have the skill.
What a wall gives
Decades of life with almost no maintenance, real security, excellent shelter, warmth for trained fruit and tender planting, and a boundary that improves rather than deteriorates.
Maintenance
Inspect annually for cracked or missing mortar, loose or displaced coping, and any leaning or bulging.
Repoint failing mortar, raking out the old material properly rather than filling over it.
Deal with a displaced coping stone promptly, since water entering the top of a wall is what causes most subsequent damage.
Any bulging or leaning needs investigating at once, since a collapsing wall is genuinely dangerous.
Keep ivy and climbers off a wall in poor condition, since they exploit existing weakness in soft mortar even though they do no harm to sound masonry.