his father james foster, was born in 1779 in berkeley county, virginia. at the end of the revolutionary war, he and his family moved to western pennsylvania with other scottish and irish families. james foster was one of the founders and original trustees of canonsburg academy, a school founded in 1791. william attended the academy until he was sixteen. he moved to pittsburgh shortly after the city's incorporation along the monongahela and allegheny rivers. william foster went to work for the company denny and bellen, "dry goods, hardware, etc." he represented the company, was promoted to a partner, and traveled to many places.