Woodpeckers are part of the family Picidae, which also includes the piculets, wrynecks, and sapsuckers. Members of this family are found worldwide, except for Australia, New Guinea, New Zealand, Madagascar, and the extreme polar regions. Most species live in forests or woodland habitats, although a few species are known that live in treeless areas, such as rocky hillsides and deserts, and the Gila woodpecker specialises in exploiting cacti.
Members of this family are chiefly known for their characteristic behaviour. They mostly forage for insect prey on the trunks and branches of trees, and often communicate by drumming with their beaks, producing a reverberatory sound that can be heard at some distance. Some species vary their diet with fruits, birds' eggs, small animals, tree sap, human scraps, and carrion. They usually nest and roost in holes that they excavate in tree trunks, and their abandoned holes are of importance to other cavity-nesting birds. They sometimes come into conflict with humans when they make holes in buildings or feed on fruit crops, but perform a useful service by their removal of insect pests on trees.
The Picidae are one of nine living families in the order Piciformes, the others being barbets (comprising three families), toucans, toucan-barbets, and honeyguides, which (along with woodpeckers) comprise the clade Pici, and the jacamars and puffbirds in the clade Galbuli. DNA sequencing has confirmed the sister relationships of these two groups. The family Picidae includes about 240 species arranged in 35 genera. Almost 20 species are threatened with extinction due to loss of habitat or habitat fragmentation, with one, the Bermuda flicker, being extinct and a further two possibly being so.
Overall, woodpeckers are arboreal birds of wooded habitats. They reach their greatest diversity in tropical rainforests, but occur in almost all suitable habitats, including woodlands, savannahs, scrublands, and bamboo forests. Even grasslands and deserts have been colonised by various species. These habitats are more easily occupied where a small number of trees exist, or in the case of desert species like the Gila woodpecker, tall cacti are available for nesting. Some are specialists and are associated with coniferous or deciduous woodlands, or even, like the acorn woodpecker, with individual tree genera (oaks in this case). Other species are generalists and are able to adapt to forest clearance by exploiting secondary growth, plantations, orchards, and parks. In general, forest-dwelling species need rotting or dead wood on which to forage.
Several species are adapted to spending a portion of their time feeding on the ground, and a very small minority have abandoned trees entirely and nest in holes in the ground. The ground woodpecker is one such species, inhabiting the rocky and grassy hills of South Africa, and the Andean flicker is another.
The Swiss Ornithological Institute has set up a monitoring program to record breeding populations of woodland birds. This has shown that deadwood is an important habitat requirement for the black woodpecker, great spotted woodpecker, middle-potted woodpecker, lesser spotted woodpecker, European green woodpecker, and Eurasian three-toed woodpecker. Populations of all these species increased by varying amounts from 1990 to 2008. During this period, the amount of deadwood in the forest increased and the range of the white-backed woodpecker enlarged as it extended eastwards. With the exception of the green and middle-spotted woodpeckers, the increase in the amount of deadwood is likely to be the major factor explaining the population increase of these species.