Selecting and Preparing Window Boxes
Different types of wood products degrade faster than others. Pine for example, rots quickly, even when primed and painted or stained. Cedar and redwood have a longer life span, especially if several coats of stain or varnish are applied before planting. Pressure treated lumber is the best choice, though perhaps not as aesthetically pleasing, because the wood has been chemically treated to prevent degradation. If using pressure treated wood, seal with stain so the chemicals don't adversely affect your plants.
Prep your boxes with stain rather than paint. Stain penetrates and protects the wood better than stain. There are solid color stains available if you want the look of paint, as well as darker stains if you want a wood look. Apply at least two coats of stain, following the manufacturer's recommendations for drying times. If you want a natural look, apply at least two coats of varnish, again following the recommendations for drying times.
Drill several weep holes in the bottom of your window box. This allows adequate drainage for the plants, but more importantly, prevents a buildup of moisture that can adversely affect the wood.
Line the boxes, if possible, with plastic or galvanized containers to add another layer of protection against rotting. Drill weep holes into the bottom of these as well.
Add a layer of small crushed stone on the bottom of the liner, or on the bottom of the box if you're not using a liner, before planting. Stones allow water to drain away more efficiently. You can find crushed stones at many nursery locations. If that's not convenient, try a pet store that carries various size stones for aquariums. Look for stones about the size of a pea or a bit larger.