Wigham was born to a Quaker family in Newington, Edinburgh, Scotland. His father, John, operated a mill for the manufacture of shawls and his mother, Jane née Richardson, died in 1830. When he was 15 years old he was apprenticed to his brother-in-law Joshua Edmundson in Capel Street, Dublin, Ireland. Edmundson & Co. dealt in ironmongery, ran a brass foundry, and carried out tin plate working and japanning (metal paintwork). After John joined, they also provided gas generation plants. On 26 January 1848, Joshua died of typhus, which he contracted whilst providing relief within soup kitchens during the Great Famine. Though John was only 19 years old, he took over operation of the company and provided for his sister and her children. His sister Eliza Wigham became a leading citizen of Edinburgh leading campaigns for women's rights and abolitionist.