While technically there's nothing stopping you from using the original WD-40 formula to lubricate garage door opener parts, it's not the right product for the job. Use a lubricant designed for garage door maintenance, a silicone-based lubricant spray, or a white lithium grease instead. The WD-40 product line includes both silicone lubricants and white lithium grease, and either of those work well on moving garage door parts.
Skip Regular WD-40
The classic WD-40 formula is a great product to have on hand for lots of maintenance projects, but it's not ideal for the moving parts of a garage door opener. WD-40 is good to spray on nuts and bolts for rust prevention before putting a project together, but it's not an ideal lubricant for garage door and opener parts. WD-40 also comes in handy for removing rust and general crud from metal parts.
Video of the Day
WD-40 dries relatively fast, compared to products actually designed as garage-door or general-purpose lubricants. It's a thin product that could run after you spray it, so it doesn't necessarily stay where you'd like it to go.
Sprays vs. Greases
While silicone-based lubricants are often in a spray can as is WD-40, lithium-based lubricants are typically in a grease form, applied with your fingers, a rag, a paintbrush, or straight out of a tube. Spray-based silicone and garage-door lubricants are ideal for lubricating the bearings and inner parts of the rollers along a garage door track. Use the little straw that fits into the spray can nozzle for pinpoint accuracy.
Grease-based lithium lubricants are good for coating all of the springs connected to your garage door setup, as the grease stays put, protecting the springs from rust and corrosion. Grease may also be used on hinges if you're concerned about a spray-based lubricant leaking onto the panels of your garage door. If your garage door opener is a screw-drive type, lubrication is a must. Use a lithium grease in a tube and apply the grease to the screw assembly, using your finger to work the grease in. Models may vary a bit from one to another, so it's best to consult your owner's manual for the maintenance schedule, since lubrication is a requirement for screw-drive garage door openers.
For a chain-drive opener, wipe old grease and gunk out of the top rail that houses the chain; then apply lithium grease inside the rail with a rag. Consult your manual to determine whether the chain itself needs lubrication; if so, apply a silicone-based lubricant. Lubricating the various moving parts of any garage door and its specific parts in its opener mechanics helps prolong the life of the entire setup while keeping it as quiet as possible during operation.