WD-40 is a multi-use lubricant that can be used to fix both squeaky door hinges and creaky floorboards. It penetrates stuck parts and loosens them so that you can clean them easily.
How do you make wood stop squeaking?
Sprinkle baby powder, baking soda or powdered graphite over the squeaky floorboard and work it into the seams. This will lubricate the wood and should keep the floorboards from rubbing together and squeaking.
Does WD-40 ruin wood finish?
Mineral spirits should normally be just naptha, where WD-40 has multiple different petroleum base oils, as well as a few other ingredients. Edit: As Allman and Keshlam say, the short answer is it will leave a residue that will be undesirable and most likely hazardous to a new finish.