A Wal-Mart Stores Inc company distribution center in Bentonville, Arkansas June 6, 2013. The annual shareholders meeting for Walmart takes place June 7, 2013. REUTERS/Rick Wilking

NEW YORK (Reuters Breakingviews) - Wal-Mart’s online therapy may help revive ailing retailers. The $242 billion giant is starting to reap the benefits of embracing e-commerce while shares in digital laggards like Macy’s and J.C. Penney plummeted after poor results. Unless they follow the behemoth’s lead, they’re likely to hand more market share to Wal-Mart and internet megastore Amazon.

After years of fits and starts, Wal-Mart’s revenue from online sales jumped by an impressive 63 percent in the first three months of the year, compared to the same period in 2016. What’s more, executives attributed the rise largely to existing operations rather than to acquisitions like last year’s $3.3 billion Jet.com deal.

Chief Executive Doug McMillon has achieved this by playing to people’s desire to save money. Customers get discounts if they buy online and pick up in a store, for example. And two-day shipping for purchases of $35 or more is free. That even forced Amazon, which rarely imitates the competition, to lower its threshold for free shipping.

It’s a relative bright spot in a troubled industry. Some are filing for bankruptcy, as teen fashion store Rue 21 did last week. Others missed estimates on poor sales, sending their shares into another nosedive after years of flat or falling revenue. Foot Locker, Dick’s Sporting Goods, Macy’s and J.C. Penney have lost between 16 percent and 24 percent in value over the past month on the back of bad earnings.

Like Wal-Mart, some have made a lot of noise about buying online stores, but keep mum about how much business they’re getting. Macy’s would only say that it’s increasing by double digits. Chief Financial Officer Karen Hoguet argues that it’s “almost impossible” to break out digital sales because of all the “cross-channel activity.”

Online, though, is where the growth is. Amazon’s U.S. sales jumped by 24 percent last quarter. Overall, industry e-commerce revenue may grow 70 percent by 2021 to $790 billion, research outfit eMarketer reckons. That’d only take its share to 14 percent of total revenue, from 9 percent this year. But with it comes greater flexibility on costs and inventory. That’ll be even more important if the recent trend continues of people spending less money on clothes in favor of travel and the like, according to Bureau of Labor Statistics data. Failing to get online right may mean getting everything wrong.