The rhyme was first published in its modern form in 1844, although the rhyming of 'puddle' with 'middle' suggests that it may have originally been the archaic 'piddle' for a stream and that the verse may therefore be much older. The first recorded text was:
It was suggested by Boyd Smith (1920) that the rhyme may be based on a story of Edward I of England travelling to Gloucester, falling off his horse into a puddle, and refusing to return to the city thereafter. There is a rhyme published in Gamer Gurton's Garland (1810) with a similar form:
Old Dr. Foster went to Gloster,
To preach the work of God.
When he came there, he sat in his chair,
And gave all the people a nod.
This variant and the late date of recording suggest that the medieval meaning is unlikely.
Two other explanations have been proposed.
1. That Doctor Foster was an emissary of William Laud, Archbishop of Canterbury, who visited Gloucester with instructions that all communion tables should be placed at the east end of the church instead of their post-Reformation or Puritan position in the centre of the chancel: but that he had not been able to reach Deerhurst because the Severn was in flood.
2. That it refers to an incident in the play Doctor Faustus by Christopher Marlowe wherein he is referred to as Doctor Fauster by a person whom he caused to get wet crossing a river by conjuring a straw into a horse which changed back to the straw in the middle of the river.