Like Martin said, WD40 is NOT what you should use. It used to contain silicone (I don't think it does anymore) which shouldn't come anywhere near anything that's going to be painted. That's just wishing for fisheyes in your finished paint. But even if WD40 doesn't contain silicone anymore (and that's not certain), it's not what to use. WD40 does contain <35% petroleum base oil (non-hazardous heavy paraffins) (wax), which is equally bad for paint.
You should use a specific wax and grease remover.
Example