Memories of her Hauppauge childhood flood back to actress Donna Murphy in a flash. Morning walks to Forest Brook Elementary School. The nearby Carvel. And, most important, the middle school musical.

“We did a musical, and drama class was part of the curriculum — in a public school,” she says. “The arts out there were tremendous, as were athletics, perhaps, but I didn’t know anything about that,” she jokes.

Looking back comes easily to the two-time Tony Award winner. It’s looking forward that’s tougher, seeing herself in two new roles — one in real life, as an unexpectedly single mom raising a 12-year-old daughter, the other onstage at the Shubert Theatre playing Dolly Levi once a week in the Tony-winning revival of “Hello, Dolly!”

“When I first read that Bette Midler was doing the show, I thought, ‘It doesn’t get any better — she was born to play that role,’ ” says Murphy, 58, who’d never considered the part herself.

But after a grueling year grieving the death of her husband, actor Shawn Elliott, Murphy realized signing on to be Midler’s alternate, playing Dolly on Tuesdays, was the perfect way to dip a toe back into show business. And the perfect comeback role, with more to teach her about how to “rejoin the human race,” as Dolly puts it, than she ever expected.

MIDDLE SCHOOL MEMORIES

If teachers have the power to put students on a trajectory, then Murphy’s course was set back in sixth grade, when she met Hauppauge Middle School drama teacher Judi Kahan (later known as Judi Beck).

advertisement | advertise on newsday

Sitting in a coffee shop on Manhattan’s Upper West Side, Murphy — known for Broadway star turns in “Passion” and “The King and I,” and films like “Tangled” and “Star Trek: Insurrection” — beams recalling her middle school musical, “Full Fledged Spirit,” created by Kahan with original songs as well as music from “Hair” and “The Roar of the Greasepaint — the Smell of the Crowd.”

“Judi was such a force of nature,” says Murphy. “She had us improvising, and writing back stories for our characters.”

Murphy assumed that kind of arts emphasis was standard, until the following year when her parents moved her and her six siblings to Topsfield, Massachusetts. Her junior high produced a play, but there were no musicals until high school. Murphy was shocked. “But I remember Judi, very clearly, saying, ‘If opportunities are not there for you . . . create them.’ ”

So Murphy spoke up, and within a year, she got the OK from school officials to put on “The Wizard of Oz” with next to no funding. Murphy got hold of the original play, and she and her gal pals cobbled together a script based on it and dialogue they copied from the 1939 movie.

Murphy — big surprise — played Dorothy, along with another classmate. All the leads were double-cast, and it was the first time Murphy ever shared a role.

“And now . . . here we are,” she says. “Who knew, right?”

DIFFICULT CHOICES

Stirring her tea, she speaks quietly about the last five years before her husband’s death, when he faced a series of illnesses, eventually being diagnosed with stomach cancer.

Three days later, her daughter, Darmia, started a new school, and Murphy recalls dashing from the intensive care unit to meet-the-teacher days and back.

Murphy’s husband died in March 2016, and just a few months later she got the offer to be Midler’s alternate. It wasn’t an easy choice. For a star of Murphy’s stature, it could be seen as a step down. Then again, Murphy promised Darmia she wouldn’t take any jobs that would take her away for long periods. This was local. And the role seemed tailor-made for this moment in her life.

advertisement | advertise on newsday

It’s easily overlooked in most productions but there are actually three widowed roles in the show — Dolly, grumpy Horace Vandergelder (David Hyde Pierce) and romantic Irene Molloy (Kate Baldwin). Far from the standard boy-meets-girl plot, this is a story of finding love the second time around — with all the guilt that entails, as Dolly expresses in various monologues about her late husband.

When she first read the script, Murphy thought, no, it’s too soon. She worried about her stepdaughters, grown children from her husband’s previous marriage, who’d watch her onstage as Dolly telling her late husband she was ready to move on.

“But they said, ‘Oh, Dad is all over this job — he has a hand in this,’ ” she recalls.

BACK WHERE SHE BELONGS

Talk to actresses who’ve played Dolly and they’ll tell you the role has an uncanny way of getting under your skin. That may be why Midler agreed to a long run. Some suspected the megastar might leave the show shortly after the Tony Awards in June, but Midler recently announced she was staying through Jan. 14. (Her replacement — whether Murphy or someone else — hasn’t been revealed yet.)

advertisement | advertise on newsday

At present, Murphy’s happy doing one show a week, noting how Dolly’s become, for her, another great teacher. Like in the famous scene at the Harmonia Gardens restaurant, when all eyes are drawn to the top of the stairs, and Dolly makes her entrance for the showstopping title number.

“Dolly hasn’t been to that place since her husband died,” Murphy says. “She doesn’t know what to expect, but she chooses to believe it’s going to be wonderful. She trusts.”

In her first performance, in June, at the top of the stairs, Murphy recalls stepping into the spotlight — and hearing a thunderous wave of applause.

“That moment . . . that’s the universe saying, ‘Yes, Dolly, yes.’ And it’s saying ‘Yes, Donna,’ too. ‘You are where you’re supposed to be right now, in this dress, with all these stairs to walk down . . . by yourself. But you’re not alone.’ And that’s the thing . . . I remembered . . . ”

Murphy’s voice gets tight, her eyes teary.

“In that first . . . performance, the music started and I realized, oh, I should be walking, but I was still standing there.”

She hustled down the stairs and hit her next mark as the waiters started singing. “Hello, Dolly . . . it’s so nice to have you back where you belong.”

And it is.