The stars were supposed to be aligning for the retail industry. With the more Americans working and a key measure of consumer confidence at its highest level in nearly seven years, many economists predicted that retail sales would rise modestly for the sixth straight month.

But on Wednesday, the Commerce Department reported that retail sales stayed flat in July, a sobering reminder that stagnant wage growth is keeping consumers cautious.

Growth of retail and food services sales saw virtually no change in July compared to June, and showed just 0.1 percent growth excluding automobiles and gas. The July figures marked the retail industry’s worst performance since bad weather kept shoppers home in January.

“It’s a bit of a head-scratcher, given all the positive news we’ve been seeing on the labor front,” Ken Perkins, president of Retail Metrics, said of the unexpectedly low July sales figures.

July’s numbers were pulled down in part by weak department store sales, which fell 0.7 percent. That performance was highlighted by retail giant Macy’s, which posted weak second quarter financial results on Wednesday. Macy’s saw its sales for the quarter rise by 3.3 percent year over year, falling short of analysts’ predictions.

The news was so disappointing that Macy’s downgraded its same-store sales outlook for the year to 1.5 percent to 2 percent, down from its previous forecast of 2.5 percent to 3 percent growth. Same-store sales, which do not include stores opened or closed in the past 12 months, are considered a key measure of a retailer’s health.

Macy’s chief executive Terry Lundgren said in a statement Wednesday that the retailer’s business outlook is “tempered with the reality that many customers still are not feeling comfortable about spending more in an uncertain economic environment.” The company’s stock tumbled 6 percent Wednesday.

Analysts blame sluggish wage growth for anemic retail sales, saying shoppers have been left with little extra cash to splurge. Average weekly earnings, adjusted for inflation, fell 0.2 percent in the year that ended in June, according to data from the Bureau of Labor Statistics, the farthest fall since October 2012.

“I think that has been the primary reason why retail has been sluggish for some time and consumer spending hasn’t really taken off,” Perkins said. Many low- and moderate-income consumers who pulled out of stocks during the recession, Perkins said, have missed out on the now-ebullient stock market’s gains, and are now reliant on slow-to-come wage and salary increases for an income boost.

Wall Street seemed to have shrugged off Wednesday’s weak retail numbers. The Dow Jones industrial average was up by 0.6 percent, and the S&P 500 index was up by 0.7 percent on the day.

Some market observers have said they thought the disappointing retail sales numbers could prompt the Federal Reserve to reconsider or delay its plans to rein in its current monetary policy in the coming months. The Fed has slowed its bond purchases and indicated plans to raise its near-zero interest rates next year.