Mineral spirits. I've been using this for decades, and my dad for decades before that. I once left some chains and other bike parts marinating in Varsol for 6 months and upon decanting, they showed no deterioration whatsoever; they were just clean.
Anything water based, including anything 'Green' is hopeless as a solvent. Take that from a chemist.
Wd40 is a poor solvent and worse as a lubricant.