When I read about the wars of Louis XIV, locations like Ostend and Liege are heavily fortified and positional warfare of taking and maintaining forts and fortified cities is key while pitched battles tend to be indecisive.
By the time of Napoleon this seems to be a thing of the past, armies are not besieging forts and walled towns but fighting apocalyptic pitched battles like Austerlitz, Ulm and Borodino. Positional warfare around fortified locations seems to be out of fashion.
My question is why did walls seem to lose their importance in the 100 years that separate Louis and Napoleon? Or am I misrepresenting the importance of walls c. 1700 and their unimportance c. 1800...?
The decline of the European walled city was a long and protracted process in the history of the continent. Walls and other urban fortifications had been a perennial feature of the European landscape reaching as far back as the Roman empire, starting in the early eighteenth and and picking up an accelerated pace with the French Revolution, defortification became the norm for the European urban space. This defortification had several overlapping and often mutually reinforcing factors behind it.
Paradoxically, the decline of the urban fortification is connected one of the reasons for its rise: the growth in sieges. As the trace italienne system of bastion and star fortresses gained wider currency, sieges became more prolonged and costly. In addition to maintaining an expensive siege train, European armies needed to also build their own fortifications, garrison them, and raise a large enough army to protect the siege equipment from any relief force. While medieval sieges were no small matter, the early modern siege necessitated an investment in a wide panoply of military equipment, often representing the cutting-edge technology of the seventeenth- and eighteenth centuries. This process reached its zenith under the auspices of Vauban of Louis XIV, who corseted the frontiers of France with modern star fortifications. But the expense of these fortifications meant that early modern European leaders tended to build them sparingly at strategic sites. Fortifying every city with modern walls and bastions was prohibitively expensive. The new found emphasis upon strategic geography meant these early modern generals saw the capture of the enemies' major fortresses as a major strategic priority.
The expense of fortresses and sieges and the growth of standing armies underscores the growth of the state power in the early modern period. However, one of the essential catalysts for such growth was increasing revenue. In this respect, fortifications represented a potential danger to the state. Most of Europe's monarchies were what J. H. Elliott termed "composite monarchies" in which the sovereign ruled via a series of contracts with various components of the realm. Within such composite monarchies, cities occupied an anomalous position in which they often possessed a degree of autonomy and seldom possessed the dynastic or other familial compacts with the sovereign that characterized other components of the realm. The rise of absolutism and the increasing costs of the state upset this already precarious balance. The drive for revenue along with other issues like religion increased the chances for municipal revolts in the seventeenth century. Defortification was one of the common consequences of a failed revolt. Similarly, defortification was a common demand placed upon defeated powers by victorious states. This became quite pronounced in the Holy Roman Empire, which in contrast to France, tended to fortify cities in the eighteenth century. Yet fortifications made them a target in wartime and because the small states and free cities could not maintain the military strength to successfully defend them against larger states. The French Revolution accelerated this trend. The numbers for the HRE are quite telling; between 1688 and 1788, the HRE averaged about two defortifications per year, but between 1789-1815, the yearly average grew to approximately thirteen. As such, defortification came either by foreign fiat or from pressure from below as municipal leaders did not want to see their city sacked.
But defortification also had a profound symbolic importance in the absolutist era. In 1670s, Nicholas La Mere would commented that in lieu of moats, palisades and other martial elements, Louis XIV's symbolized his rule over Paris with wide boulevards, victory arches, and other open spaces. By emphasizing that the monarch did not need such spaces, it highlighted the absolutism of a monarch that did not feel the need to hide behind these walls. The erection of new fortresses also highlighted that the decision to fortify or not lay within the hands of the monarch, not his subjects.
Breaking the walls of defeated powers had a similiar psychology behind it. Not only was it a physical sign of defeat, but also a symbolic humiliation of the urban community. Early modern municipal political culture would emphasize that the true city began at the walls, which was one of the reasons why antisemitic legislation often forbid Jews from residing inside the walled area. Breaking walls meant that fit within the new kind of warfare that characterized the French Revolution and the new political arrangements that came with its incentive to modernize. The marching speed of the Revolutionary armies and their increased size meant that sieges became less important to European warfare, but they did not disappear entirely. A number of German contemporaries interpreted Mack's ignominious surrender of Ulm as a passing of an era wherein warfare was now mobile. But as European military leaders of the revolutionary and Napoleonic period began to prioritize mobility, they made it imperative that an important component of peacetime settlement was defortification as these generals saw a siege as an impediment to operations. Although the French artillerist Gribeauval introduced improvements in siege artillery in the the reign of Louis XVI, siege artillery was still ponderous and not so much of an revolutionary departure from the siege train of Vauban as it was a refinement of it.
The final death-knell of the fortified city came with the early industrialization of the nineteenth century. The explosive growth of the city meant that urban planners saw fortifications as a hindrance to the orderly conduct of the cities' functioning. Walls and other all embracing fortifications were no longer symbols deeply entwined into a city's municipal character and corporatist self-conceptualization.
Sources
Lynn, John A. The Wars of Louis XIV, 1667-1714. London: Longman, 1999.
Mintzker, Yair. The Defortification of the German City, 1689-1866. Cambridge: Cambridge University Press, 2012.
Parker, Geoffrey. The Military Revolution: Military Innovation and the Rise of the West, 1500-1800. Cambridge [England]: Cambridge University Press, 1988.
The increased range and firepower of artillery meant that no wall is safe, no matter how thick or how high. Building walls was expensive and time consuming and you can't just build a shield, you need to envelope your city, all for that to be destroyed by a few cannons.
The transition from blades to gunpowder meant that sieges were no longer battles between shielded archers and besieging archers. Although a fort could still line up riflemen to shoot at someone besieging the castle, no one is really going to try to climb the walls - they'll just tear them down with a cannon from afar.
Cannons were advancing in power, distance, precision, accuracy and firing time faster than anyone could build a fort. And there is no fort that could withstand incessant artillery fire. Even if the besieging army were to chip away at your wall slowly, eventually they'll break through.
That's the military aspect of it, but economically, it wasn't worth it to lose a castle's walls for every battle. The cost of rebuilding the wall could be used to build an army that can launch a counteroffensive at the attackers rather than defend a town or a fort from attack.
Having that said, the landscape of Europe changed. There was a consolidation of power and a move away from small independent city states toward larger kingdoms and empires. There was also a population growth and urbanization - there were more and more cities and towns to defend - you can't wall them all, and protecting the capital and a few major towns when an invader has seized the countryside, your shores, towns, trade routes and a third of your country is pointless.
The Franco-Prussian war (1870-71, not a very early example, but proves the point) - Prussia did not need to breach Paris to force the French surrender.
And even if one could make an impenetrable wall - cities themselves were becoming modern cities - urban environments where people worked in the secondary and tertiary sector of the economy. They were not self-sufficient areas with their own supply of food. They were highly dependent on trade, just like modern cities. Think modern cities - how long can any modern city survive without trade? Then think that these cities did not have refrigeration, canned foods, etc. Any town under siege would be able to get by if they were prepared for siege, but sooner or later, they'd end up eating horses, pigeons, cats and rats and burning books and furniture for heat.
And finally, there was less and less time to prepare for a long siege. More and more states had professional, trained standing armies ready for war. They did not declare war then try to enlist people and train them - they just had soldiers, as a profession. Wars were shorter and quicker.
I hope this gives you an idea of all the changes that happened to make trying to fortify everything an expensive and futile exercise.