When and why did city walls fall into disuse, and then stop being built altogether?

by YUnoZOOM
silverionmox

Gunpowder did make them less effective, but star forts with mounted artillery were the response to that, so fortifications didn't become useless overnight. Later on we still see bunkers and trenches.

The economy, as it often does, was a main driver behind the changes: city walls used to function as a the border of the city authority and the legislative privileges it enjoyed. This included levying of tolls. As legislation promoting trade and industry was extended from within cities across the whole country, tolls disappeared and city walls lost an important function. Moreover, continued population and economic growth and migration from the countryside after productivity improvements in the 17th century made sure cities swoll beyond their walls. Given the reduced function of walls and the pace of growth, it wasn't deemed opportune anymore to invest in a larger, more expensive and harder to defend, wall to try to encircle a town that would probably grow out of it again soon. The existing walls were torn down and city boulevards (circular ringways) took their place (derived from the word bolwerk - fortification). This freed up building materials and provided more room for the increased traffic, both of which very useful for an expanding economy.