Attingham Park has followed the trajectory of most stately homes. Chris Upton looks at its fascinating story.

The story of our great stately homes traces a familiar trajectory. It begins with the conversion of an older house into something more grand and Georgian. A second generation of owners fills it to brim with all the booty of the Grand Tour – classical sculptures, Italian landscapes and souvenirs from Vesuvius.

Then the next lord overreaches himself, and spends too much on fancy landscaping and horses.

There’s an unwise marriage, unpaid bills and a fire sale.

Finally, in the face of hefty death duties and declining agricultural revenues, the house – stripped of much of its contents – is handed over to the National Trust, and recovery can finally begin.

Attingham Park in Shropshire has most of these skeletons in its closet.

Glimpsed through the trees, its harmonious facade gives no hint of what it has been through.

But inside, and in the gardens and out-buildings, we can get a sense of a place dragged back from the brink.

Many of these Palladian houses – like Attingham, Croome or Compton Verney – have this kind of uncomfortable “after history”, when the stately owners have jumped ship, and their former home looks through the situations vacant column for a new career.

For Attingham there was a spell as the bolt-hole for Edgbaston School for Girls, fleeing from the Birmingham Blitz, and then as a base for the Women’s Auxiliary Air Force.

When the war was over, the house was leased to Shropshire County Council and run as a residential adult education college, offering an impressive range of courses from astrology and theatre to folk dancing.

But like a ghost from an earlier age, the last Lady Berwick, eighth of that ilk, continued to live on at Attingham, seeing the house more lived in and busy than at any time during her life.

Today, all the Berwicks and the students having moved on, Attingham is the National Trust’s work-in-progress, an essay in how to bring a house back to life and, more importantly, how to make it appeal to 21st-century visitors.

It’s the walled gardens that are currently the centre of attention, as staff and volunteers methodically bring them back into production.

On the day we visited, chickens were picking around the old boiler house and a log fire – two log fires, in fact – were burning in the bothy.

After a century of slumber it feels as if the gardens are waking up.

Such walled gardens – ever since Heligan – have become one of the stately home’s biggest draws, an educational alternative to an afternoon in the local garden centre.

Attingham’s is one of the most impressive, two-and-a-half acres in extent, with a second and smaller garden attached.

The gardens were constructed, probably at the same time as the main house, in the 1780s.

Noel Hill, the first Lord Berwick, wrapped an already existing house – Tern Hill – in a fashionable Georgian overcoat, and added stables and a walled garden, far enough from the house to be out of view.

The sight of all those gardeners slaving over a cold frame was not to be encouraged. Out of sight the walled garden may have been, but it was not out of mind.

After all, this was Attingham’s pantry and larder, vegetable rack and fruit bowl, all rolled into one.

Large sums were spent buying fruit trees for the orchard, and vast numbers of seeds from the garden catalogues.

In this carefully controlled micro-climate the walled garden could produce pineapples for the winter table, as well as grapes, melons and mushrooms all through the year.

Key to the desert course was the heated north wall, kept warm by a boiler that blew hot air between the two lines of bricks.

But just as vital was the labour of the gardeners themselves, differentiated – by age, experience and wages – into “inside men” and “outside men”.

The youngest of them were obliged to sleep in the bothy attic, on hand to tend the boiler and the glasshouses night and day.

Much as stable boys had to sleep upstairs from their horses.

At its height, Attingham Parl was practically self-sufficent, game from the woods, fish and eels from the river, and fruit and veg from the gardens. A rare Georgian bee-house, designed perhaps by John Nash or Humphry Repton, supplied the sweetener.

It still stands today, still inhabited, near to the south wall of the garden, though I did not care to venture near it.

But as local feudalism gave way to capitalism, such instinctive self-sufficiency eventually fell out of fashion.

The market could supply all instead, and the kind of labour intensity required in the upkeep of a walled garden became too much for the landed budget to bear.

Unlike some walled gardens, those at Attingham were never really modernised; they simply fell out of favour and into neglect.

By the 1940s the college students were able to play football on a very unusual walled football pitch. Luckily for their survival, all the glasshouses were in the garden next door.

But you can’t keep a perfectly good garden down for ever, though a walled enclosure as large as those at Attingham, Croome and Elford take some concerted effort to revive.

Luckily for Attingham, the National Trust has never been short of volunteers.