Porridge originated as one of seven pilots in the Ronnie Barker showcase series Seven Of One. Another one of the programmes, I'll Fly You For A Quid, was also written by Clement and La Frenais. The BBC liked both programmes so much that they commissioned a series - leaving it up to the two writers and Barker to decide which of the two they would actually produce.
The BBC requested permission on a number of occasions to film scenes at a real prison, but were denied access. In the event, the sets designed by Tim Gleeson were so accurate that the prison service believed they had gained access to a genuine facility.
Long before Porridge came to life, Ronnie Barker had had an ambition to make a prison-set comedy. He would later describe the series he envisioned as being more like 'Bilko' (American sitcom The Phil Silvers Show).
In the pilot episode, Prisoner And Escort, Mr. Barrowclough's name is spelled Barraclough.