Walmart Inc., in a letter to be issued Monday to suppliers, will require its direct suppliers of lettuce, spinach and other greens to join its food-tracking blockchain by Jan. 31. The retailer also will mandate that farmers, logistics firms and business partners of these suppliers join the blockchain by Sept. 30, 2019.

The supplier push comes after 18 months of testing the blockchain system from developed by International Business Machines Corp. Tests to trace berries, mangoes, baby food, chicken and other foods on the IBM Food Trust blockchain have produced a more complete view of the food system than under current federal regulations, according to Nestlé SA, Dole Food Co., and other participants in the project.

Pinpointing the source of food contamination can improve public safety, cut the amount of time illness goes unchecked and could save money for retailers and farmers who can be swept into overly broad product recalls, said Frank Yiannas, head of food safety at Walmart. Millions of bags and heads of romaine lettuce had to be thrown out as an eruption of E.coli linked to romaine spread through 36 states early this year. As investigators worked, 210 people got sick and five died, according to the Centers for Disease Control and Prevention.

A directive for suppliers to use the Food Trust blockchain will help the industry create a more complete picture of the food system than is possible under current federal regulations, Mr. Yiannas said in an interview. The goal is to speed up and improve the accuracy of recalls when food-borne illness or other problems emerge, he said.

“Today, the requirement for traceability by law is one step up and one step back. That doesn’t work any more,” he said.

Early this year, as investigators worked to understand an outbreak of E. coli linked to romaine lettuce grown in the region of Yuma, Ariz., 210 people in 36 states got sick. Five people died, according to the Centers for Disease Control.

“Blockchain can and should be used to promote transparency around food safety,” said Natalie Dyenson, vice president of food safety and quality at Dole, which, with Walmart and eight food companies, founded the Food Trust group.

Retaining consumer trust in product safety is valuable, she said. Beyond public health concerns, incidents like this year’s romaine problem can erode sales across the industry.

“We didn’t have any growers that were part of that outbreak. But when one fails, we all fail because customers don’t look at a head of lettuce and say, ‘Dole didn’t have a problem.’ They just don’t buy lettuce,” she said.

“Every single lettuce processor in the U.S., Canada and Mexico took a financial hit,” she said.

Corporate use of blockchain technology is aimed at governing transactions with many hand-offs while preserving one consistent history. Blockchain establishes authorship or ownership that experts say can’t be faked and eliminates costly middle layers because of its peer-to-peer structure. The encrypted data stays up-to-date on all participants’ systems. Food Trust is based on IBM’s version of the Hyperledger blockchain platform, an open-source project hosted by the Linux Foundation.

A Food Trust trace of a shipment of strawberries in early December 2017 shows that they traveled from two distributors, in Clarksville, Ark., and Ochelata, Okla., to five Walmart stores. Photo: Kim Nash, The Wall Street Journal

Walmart in the past has mandated that suppliers use other technologies, including RFID tags on pallets and cases of goods, in the early 2000s. The retailer’s push to require the use of blockchain by suppliers likely will accelerate use of the technology, said Greg Buzek, principal at IHL Group, which analyzes the retail industry.

“This is unlike some of the other mandates that Walmart has [made], which primarily only benefited Walmart and added costs to manufacturers,” Mr. Buzek said in an email. “In this case, there are benefits to manufacturers, Walmart and the consumers.”

Farmers and others use a variety of technologies and some hardly any, instead keeping records on paper. Getting information about fields, lots and shipments into Food Trust will require a variety of methods, Ms. Dyenson said.

The group has developed a web portal that farmers can use from a desktop or laptop computer to enter data, she said. In addition, IBM is expected to announce this month a mobile app for accessing Food Trust. IBM continues to work closely with Walmart and other Food Trust members to expand the blockchain platform and add tools for using the data.

Dole, a key supplier to Walmart, has uploaded shop-keeping units and other data about packages of lettuce and spinach to Food Trust and is now uploading information about more complex products such as salad kits, she said. Dole expects to meet the January deadline and is helping its own suppliers prepare their data, she said.

At larger growers, data is available through existing electronic-data interchange systems that the grocery industry has used for decades, she said. Small family-owned farms can export spreadsheets or use the mobile app, she said.