Chain cleaning and lube practices are an Olde Tyme Religion debate.
1. WD-40 is a Water Displacement agent, not a lubricant. On bikes, it's useful for removing handlebars and getting new grips to slide on. That's pretty much it.
2. Some people are wax lube devotees (White Lightning). Less mess, but very short lifespan. As short as 50 miles in bad conditions.
3. I'm an oil lube guy. The typical recommendations are Triflow and Boeshield T-9. I use TriFlow. Apply a drop to each link, run the chain a few full revolutions, then take a shop rag and lightly wipe off excess oil. I typically relube about every 200-300 miles, but it really depends on the conditions. If the chain squeaks, it needs lube.