Parts of the walls were regularly used for recreational walking in the 18th and 19th centuries. In its ruinous state, the precinct of St Mary's became a visitor attraction as a ‘romantic ruin’, set within picturesque gardens.
The coming of the railways had a significant impact on the walls when the railway station was constructed inside the City Wall circuit and arches were formed in the walls to allow trains through.
The City Walls avoided comprehensive demolition during the 19th century. In 1800, the Corporation of York resolved to demolish the walls and, despite refusal of permission from George III, a number of stretches of Wall, posterns and parts of other structures were taken down. This led to supporters for the retention of the walls forming the York Footpath Association. This group raised money and restored sections of the walls. In 1855, the Board of Health Committee proposed to demolish a large part of the walls between the Red Tower and Walmgate Bar to improve the locality. They argued that the walls prevented the free circulation of air and were therefore a health hazard, but this ‘improvement’ was not implemented and instead the Corporation of York restored much of the walls and bars during this period.
During the Second World War, the ramparts were used to protect the people of York, through the accommodation of air raid shelters. Several were constructed within the ramparts at Baile Hill, Dewsbury Terrace in Bishophill (thought to be the largest in York), Station Rise, east of Robin Hood Tower and at St Leonard’s Hospital at York Explore.
Today the walls are a key heritage attraction for the city and are visited by thousands of people a year.