W.F.P. Stockley was born in Templeogue, County Dublin, and was educated at Rathmines School. He was the son of John Surtees Stockley (1816-1863), who had been a British Army veterinary surgeon with the Royal Artillery during the Crimean War (and for which he was awarded the Légion d'Honneur by the French government), and Alicia Diana Catherine Gabbett of High Park, Caherconlish, County Limerick, who was descended from the O'Brien Princes of Thomond, the O'Conor Princes of Connacht and the Burke Lords of Mac William Íochtar.
W.F.P. Stockley's grandfather, William Stockley (1776-1860), a veterinary surgeon in the Royal Artillery from 1805 to 1858 and President of the Royal College of Veterinary Surgeons, lived in Corkagh, Clondalkin, County Dublin, until 1837, after which he served in Canada and later lived out his life in London. The Stockleys were a Protestant family and W.F.P. Stockley had been raised in that faith before converting to Roman Catholicism in 1894.
From 1896 to 1903 he was professor at the University of Ottawa and at the University of New Brunswick. In 1905, he was appointed professor of English at University College, Cork. He occupied the chair until his retirement in 1931.
He was president of the Cork Literary and Scientific Society from 1913 to 1915 and President of the Cork Library Committee from 1913 to 1930.
He was author of several books including English Visitors to Ireland from Raleigh to Newman, Newman, Education, and Ireland, Studies in Irish Biography and Introduction to the Dream of Gerontius.
Stockley was a member of Sinn Féin. He was an alderman of the Cork Corporation from 1920 to 1925. In 1920, an attempt was made on his life by police agents. In the 1921, he was elected a Sinn Féin member to the Second Dáil for the National University of Ireland constituency. He voted against the Anglo-Irish Treaty of 1921 and refused to accept the legitimacy of the Irish Free State.
He retained his seat, as an Anti-Treaty Sinn Féin candidate, in the 1922 general election. Along with others, he maintained that the Irish Republic continued to exist and that the rump Second Dáil, composed of anti-Treaty TDs who refused to take their seats in the Free State parliament, was the only legitimate governmental authority in Ireland. He was defeated in the 1923 general election and subsequent 3 November 1923 by-election.
William Stockley married Violet Osborne in 1892, daughter of Dublin artist William Osborne RHA and sister of Walter Osborne RHA. At her death in 1893 she left one daughter, Violet Annie Alice Stockley, who was brought up for some years by the Osborne family in Dublin. She later became a member of staff at Cheltenham Ladies' College and died unmarried in 1971.
In 1908 Stockley married Marie Germaine Kolb, the daughter of Max Kolb, director of the Botanical Gardens in Munich, and Sophie Danvin, a French pianist, and the sister of the writer Annette Kolb. Marie Germaine Stockley died in Dublin in 1949 leaving one daughter, Sophia Stockley.
Stockley's brother was the Very Rev. Joseph John Gabbett Stockley (1862-1949), Canon of Lichfield Cathedral. Stockley's sister-in-law was the German writer Annette Kolb, and a nephew, Dr. Alfred Kolb, was a West German diplomat who helped establish the Federal Republic's first Irish legation in 1951.
- "Professor William Stockley". Oireachtas Members Database. Retrieved 26 March 2012.
- In various obituaries of WFP Stockley in 1943, his father John Surtees Stockley (who had died 80 years previously) is referred to as "RHA" (Member of the Royal Hibernian Academy). However, the RHA has no record of his membership. JS Stockley's gravestone (and contemporary newspaper reports) refer to him as "RA" or "late RA", referring to his time in the Royal Artillery.
- "William F. P. Stockley", Ricorso.
- "William Stockley". ElectionsIreland.org. Retrieved 26 March 2012.
- Fleischmann, Ruth. "Aloys Fleischmann (1910-1992): Diary of 1926, Diary of 1927". Cork City Libraries. p. 14. Retrieved 7 July 2014.
- Kolb, Annette, Deutsche Biographie
- Reiser, Rudolf (2009). Alte Häuser - Große Namen: München (in German). Stiebner Verlag. p. 270. ISBN 9783830710493. Retrieved 7 July 2014.
- "Obituary: Prof W. F. B. Stockley", Irish Independent, 24 July 1943, p. 3.