NEW YORK — General Mills is recalling 1.8 million boxes of Cheerios and Honey Nut Cheerios produced at a plant in Lodi, California, saying the cereal is labeled gluten-free but actually contains wheat.

The recall affects Cheerios and Honey Nut Cheerios that were made in July. The Minneapolis company said wheat flour was inadvertently used in a gluten-free oat flour system. The use of wheat flour means the cereals are not gluten-free, and people with conditions like wheat allergies or celiac disease who consume them might suffer an allergic reaction or discomfort.

The cereal boxes have the plant code “LD.” The Cheerios have “better if used by” dates from July 14 to July 17, 2016 and the Honey Nut Cheerios have “better if used by” dates of July 12 to July 25, 2016.

The recall comes shortly after General Mills started shipping gluten-free Cheerios in five flavors in July.

General Mills Inc. said it will take the cereals out of warehouses and off store shelves, and customers who cannot eat wheat should contact the company for a replacement box or a full refund. Cereals made at other plants or on different dates are not being recalled.