The Labor Department said Tuesday that the producer price index, which measures price changes before they reach the consumer, increased a seasonally adjusted 0.3 percent last month. That followed a 0.1 percent gain in June.
Excluding food and gas costs, wholesale prices rose 0.4 percent.
Car prices rose 1.1 percent. Light truck prices increased 1.6 percent — the largest gain since Nov. 2009.
Food prices rose 0.5 percent last month, a sign that the severe drought in the Midwest is driving costs higher. The dry weather has harmed a range of crops, most notably corn and soybeans.
Corn prices jumped 34.5 percent in July, the largest gain since Oct. 2006.
Still, overall inflation remains mild.
Wholesale prices increased only 0.5 percent in the 12 months that ended in July. That's the lowest since October 2009. Excluding food and energy costs, prices increased 2.5 percent in the 12 months that ended in July, the smallest year-over-year gain since June 2011.
Low inflation means consumers have more money to spend, which helps the economy. It also gives the Federal Reserve more leeway to keep interest rates low in an effort to spur economic growth. If prices began to rise rapidly, the Fed might be forced to raise rates in response.
Still, the increase in corn prices could affect food prices in the coming months. Corn is used to make everything from cosmetics to cereal, soda, cake mixes and candy bars. It is also used as a feed for cattle and hogs. Pork, beef and veal prices also increased sharply in July.
The U.S. Agriculture Department said Friday that the U.S. corn harvest will fall to its lowest level in five years this year because of the drought.
Wholesale energy prices fell 0.4 percent in July, the first straight monthly decline. Oil and gas costs have increased recently and will probably affect August's data.
Gas prices are also starting to move back up. The nationwide price for a gallon of gas averaged $3.67 on Friday, up 11 cents in just the past week and almost 30 cents higher than a month ago.