Charles Porter qualified as Doctor of Medicine (MD) and Bachelor of Surgery (ChB) at the Royal University of Ireland in 1889. He then obtained the Diploma in Public Health at the University of Cambridge (1891), was admitted as a member of the Royal College of Surgeons (MRCS) of England (1891), and qualified as a Bachelor of Arts in Obstetrics (BAO). After serving as assistant medical officer of health for East Kent (1890-1893) he became medical officer of health for Stockport (1893-1898). During his term of office he wrote reports on "Rabies and anti-rabic inoculation" (1895) and "Stockport water supply" (1895). During these years he studied law, qualifying as Barrister-at-Law at Gray's Inn in 1898. However, he continued his medical career and in 1901 came to the Witwatersrand as medical officer of health for Johannesburg, after the city had been occupied by the British during the Anglo-Boer War (1899-1902).
Porter was licensed to practice in the Transvaal Colony in 1905. Aided by his legal training he formulated comprehensive public health by-laws (1903) that served as a model for other South African towns. He also attended to matters such as water purification, disease prevention, and refuse and sewage disposal. As a result of his efforts the prevalence of disease declined sharply. Owing to the increasing demand for health services the staff of his department grew steadily. Already by 1905 he had been elected an honorary member of the Chemical, Metallurgical and Mining Society of South Africa.
During his term of office Porter served on government committees and commissions relating to miners' phthisis (1903), the Johannesburg Hospital (1903), technical education (1903), venereal diseases in the Transvaal (1908) and tuberculosis (1912); was technical adviser to the Transvaal Prison Commission (1904) and the Native Housing Commission (1904); was medical adviser to the Rand Water Board (1905-1926); a foundation member of the Public Health Council; and specialist adviser on military hygiene to the Defence Force of the Union of South Africa, retiring from the South African Medical Corps with the rank of lieutenant-colonel. He made substantial contributions to the Public Health Act of 1919. From 1923 to 1932 he was the first lecturer on public health at the University of the Witwatersrand. In recognition of his contributions to the field the university conferred upon him an honorary Doctor of Laws (LLD) degree in 1925.
Porter was an early member of the South African Association for the Advancement of Science and served on its council for 1903/4, but his membership lapsed before 1910. He was president of the South African Medical Congress in 1922. In his presidential address, "Vetera et nova" or "then and now", he compared the status of the medical profession in ancient and in modern times and reviewed the problems faced by the South African Medical Association.
He resigned his position as medical officer of health of Johannesburg in August 1925, owing to failing health. At the time of his death in 1934 he was a government nominee on the board of the South African Institute for Medical Research. His reports and manuals on topics in health and hygiene included "Processes and hygiene of felt hat making" (1902); South Africa, Tuberculosis commission. First report, dealing with the question of the admission of tuberculous immigrants into the Union (Cape Town, 1912); Report to Public Health and Works Committees on I: Ventilation of theatres and cinema halls in Johannesburg, and II: Cinema eye-strain and its prevention (Johannesburg, 1921, with E.H. Cluver); and the Native (urban areas) Act no. 21 of 1923. His department issued a booklet, Care of mother and baby (Johannesburg, 1924, 40p). Porter was married and had two sons and a daughter.