A windowbox is the smallest useful growing space there is, and it can be genuinely productive. Before anything about planting, it has to be fixed so that it cannot fall.
Fixing it safely
A filled and watered windowbox is heavy, and above a pavement or a doorway it is dangerous if it falls. This is not a theoretical concern.
On a sill with a lip, brackets or a metal retaining bar fixed into the masonry are the reliable method. Never rely on the box simply sitting on a sill, particularly on a sloping sill, and never rely on friction.
Use fixings appropriate to the wall, into masonry rather than mortar joints where possible, and check them annually. On a rented property, check with the landlord before drilling.
Above a public pavement the responsibility for anything falling is yours, which is worth bearing in mind before choosing a heavy decorative box.
Weight
Wet compost is far heavier than dry, and a filled box may weigh several times what it did in the shop.
Use lightweight peat-free compost rather than soil-based, choose plastic or fibreglass over terracotta and stone, and keep the box to a size the fixings can genuinely carry.
Depth and drainage
Fifteen to twenty centimetres of depth is workable for herbs, salad and bedding. More is better if the fixings allow, since shallow boxes dry out within hours in summer.
Drainage holes are essential, and so is thinking about where the water goes. A box draining onto a pavement or onto a neighbour's window below causes complaints.
A drip tray beneath, or an inner liner set inside an outer box with a gap at the base, contains it. Water gently and in smaller quantities more often rather than flooding it.
Using a liner
A plastic liner inside a decorative box is worth doing. It lets you lift out and replace an entire seasonal planting in one movement, protects a wooden or metal box from rot and corrosion, and makes watering more controllable.
Two liners rotated means one can be growing on elsewhere while the other is on display.
What grows well
Herbs are the obvious success, particularly chives, parsley, thyme, marjoram and mint, though mint should have its own box since it will smother everything else.
Salad leaves crop repeatedly from a shallow box and are among the best value of anything you can grow in one. Radishes and spring onions work well.
Compact bedding, trailing lobelia and pelargoniums give a long season of colour. Dwarf bulbs, particularly crocus, muscari and small narcissi, fill the spring gap.
Strawberries, chilli plants of the compact varieties and dwarf tomatoes all crop in a deeper box.
Aspect
Match the planting to the wall. A south-facing box is hot, bright and dries out extremely fast, suiting Mediterranean herbs, pelargoniums and succulents.
A north-facing box suits ferns, ivy, heuchera, winter pansies and shade-tolerant salads. Do not attempt Mediterranean herbs there, since they will be leggy within weeks and mildewed by August.
Watering and feeding
Small containers dry out faster than anything else in the garden. Daily watering is normal in summer, twice daily in a heatwave on a hot wall.
Mix water-retaining granules into the compost at planting, mulch the surface with fine gravel, and check every day.
Compost is exhausted within about six weeks, so feed weekly with a balanced liquid feed, or a high-potassium one for anything flowering or fruiting.
Replanting through the year
A small box benefits from being replanted seasonally rather than left. Spring bulbs, summer bedding or salad, and winter evergreens with pansies gives twelve months of interest from one container.
Refresh the compost each time rather than reusing it, since the volume is small and exhausts quickly.
Wind
A box on an upper floor or an exposed wall takes considerably more wind than one at ground level, which dries it faster and batters soft growth. Choose compact, tough plants for exposed positions and keep tall or brittle ones for sheltered sills.
Check the fixings after any gale, along with the condition of the box itself. Plastic becomes brittle in sunlight over a few years and a box that has been in place a decade should be inspected rather than assumed sound.