The holiday season is important to all retailers, but none more so than JCPenney, analysts say. A JCPenney store in a Pembroke Pines, Fla. (J Pat Carter/AP)

J.C. Penney, a struggling retailer trying to reverse its fortunes, had a rare sliver of good news Wednesday.

Ahead of the crucial holiday season, the retailer said October store sales rose nearly 1 percent compared with a year ago, the first annual increase since 2011. Online sales were more than 37 percent higher than last year, the company said.

But the company’s rebound could be short-lived.

The holiday season is important to all retailers, but none more so than J.C. Penney, which counts on holiday shoppers for about 30 percent of its yearly sales, retail analysts say. The Texas-based department store has been on a mission to win back its core customers, most of whom were turned off by the direction the company took under former chief executive Ron Johnson.

“J.C. Penney really has something to prove to shoppers this year,” said Pam Goodfellow, consumer insights director at Prosper Insights & Analytics, a research firm.

The company’s stock price rose more than 7 percent Thursday after the sales report. It was trading at about $8.26 in the early afternoon.

The company has already jumped into the holiday-promotion fray. Last month, it said stores would open at 8 p.m. on Thanksgiving for the first time, joining major retailers such as Macy’s, Kohl’s and Kmart.

“We’re pulling out all the stops to be competitive this holiday season,” spokeswoman Ann Marie Bishop said in an e-mail.

Since Johnson (whose past projects as Apple’s senior vice president of retail include the Apple Store) was replaced in April, chief executive Myron “Mike” Ullman has focused on steering the retail giant back to its former strategy: offering discounts. J.C. Penney reinstated coupons and promotional offers that were popular with its customers and were abandoned during Johnson’s tenure.

It is also restocking the inventory of brands that shoppers associated with J.C. Penney stores, such as St. John’s Bay and Stafford.

Johnson’s attempt at appealing to a younger customer base by eliminating promotions, adopting an everyday low-price strategy and introducing more expensive, contemporary brands failed. Shoppers revolted, and sales dropped. J.C. Penney’s stock price has fallen more than 60 percent this year.

“He was trying to ‘Target-ize’ J.C. Penney,” said Mary Ross Gilbert, a retail and consumer analyst at Imperial Capital, an investment bank.

But that didn’t sit well with its most loyal customers, analysts say. The profile of a typical J.C. Penney customer is a woman in her 50s with a fixed income, they said.

“That’s whom they’re going to re-attract,” Ross Gilbert said.

The company has beefed up apparel inventory but still faces challenges in its home section, analysts say. In September, Ullman said that getting the section back on track was taking “much longer than originally planned.” But this month, the department saw the largest sales increase in October, the company said.

Even if J.C. Penney can entice customers, the company also faces the challenge confronting all retailers this season: the cautious shopper.

Americans are expected to scale back their holiday spending as they remain uncertain about the economy, according to analysts. The economy grew much faster than expected in the third quarter, according to Commerce Department data released Wednesday, but consumer spending decreased significantly.

Despite J.C. Penney’s efforts, that could spell bad news.

“If they don’t do well [this holiday season], it doesn’t bode well for 2014,” said Eric Anderson, a professor of marketing at Northwestern University’s Kellogg School of Management.

There’s one tradition the 112-year-old retailer is bringing back that should please shoppers: It will give away Disney snow globes on Black Friday.