MEXICO BEACH, Fla.—Nearly six months after Hurricane Michael flattened much of this Florida Panhandle town, Carol Bonanno and her husband are wrestling with a wrenching question: Can they afford to rebuild?

October’s Category 4 storm ripped the retired couple’s home from its foundation and totaled it. If they replace it, they will have to elevate the new home by about 5 feet to meet new building-code provisions that they consider excessive. That extra cost, coupled with a $120,000 insurance payout they say is insufficient, would leave them around $110,000 short—a difference they would cover by tapping their retirement funds.

“Are we going to do all this, and then another hurricane sweeps through here?” said Ms. Bonanno, 76 years old.

A satellite view of Mexico Beach, Fla., before and after Hurricane Michael. Illustration: Mapbox/NOAA

Mexico Beach is struggling with a balancing act: rebuilding to stricter standards that can guard it against future storms while not increasing costs so much that they drive away homeowners who give the town its character. The community prides itself as a destination for retired teachers, military personnel and others who can’t afford million-dollar beachfront homes. Despite the city’s need for a hefty financial infusion, it is intent on fending off developers who want to build denser and pricier projects.

Soon after the storm, residents said they started receiving inquiries from developers and investors looking to amass properties at a discount. Zach Childs, a local real-estate broker, said he was approached by some 15 investor groups. But Mexico Beach officials decided they wouldn’t change the city’s zoning to accommodate larger developments, and inquiries subsided.

“You’ve come to the wrong place,” Mayor Al Cathey said he told a pair of investors who approached him. “We’re not interested in changing who we are to accommodate money.”

Some Mexico Beach residents have responded to repeated inquiries from interested buyers by posting signs making clear they have no intention of selling.

A 545-member Facebook group called Original 98 Mexico Beach, a reference to the two-lane Highway 98 that runs through town, aims in part to help residents rebuild. It recently began selling “Not For Sale” signs that some homeowners have hung on their properties. Founder Christi Cofield, 41, said that if members conclude they must sell, they are urged to approach locals first.

In the five months after the hurricane, 46 properties sold in Mexico Beach, compared with 68 in the same period a year earlier, Mr. Childs said. Prices have held steady and are expected to rise this year as a result of solid demand, he said.

Of 1,692 houses, condo buildings and other dwellings in Mexico Beach, 809 were destroyed or substantially damaged, said Tanya Castro, the city administrator. Decades-old homes built before stricter standards were put in place largely were wiped out; newer structures had mixed results.

Mexico Beach Residents Rebuild Homeowners in Florida panhandle struggle with devastation nearly six months after storm Gayle and Rex Putnal on the plot of land where their home stood before it was washed away by Hurricane Michael. They bought a nearby parcel and plan to build a new home there. Bryan Anselm for The Wall Street Journal 1 of 6 • • • • • 1 of 6 Show Caption Gayle and Rex Putnal on the plot of land where their home stood before it was washed away by Hurricane Michael. They bought a nearby parcel and plan to build a new home there. Bryan Anselm for The Wall Street Journal

Fewer than 400 residences currently have full utility service, she said. People without a habitable place are staying in RVs locally, in rentals or relatives’ homes across different cities and states.

Some construction crews are scattered throughout the area, demolishing unsalvageable structures, clearing debris, installing new roofs and drywall. Many lots are barren, save for concrete slabs where houses once stood. There is still no functioning grocery store or gas station, and only a few restaurants, including a pizza place and a “Floribbean” spot, have reopened.

One recent afternoon, Mark Drake, 55, was installing flooring in his family’s house, which he remodeled in 2009. The storm tore it loose and swept it about 150 yards away, but the house remained intact, a tequila bottle from before the storm still sitting on a counter. Mr. Drake hired a company to transport it back to its original site.

Residents in several southern states are bearing the brunt of the devastation caused by Hurricane Michael, one of the most powerful storms to ever hit the U.S. Photo: Dan Anderson/EPA

“I really wanted to give the house another chance,” he said. It would be its third life, since it was first erected by his father-in-law in Havana, Fla., in 1973 and moved down decades later.

The Mexico Beach City Council imposed a three-month moratorium on building permits to settle on code changes. That ended on Feb. 11, and the city now requires new homes be built 1.5 feet above where floodwaters are expected to rise in a 500-year storm—one that has a 0.2% chance of occurring in a given year, according to the Federal Emergency Management Agency. In effect, that could mean elevating some homes from 2 feet to 12 feet, Ms. Castro said.

Yet the city took a more restrained approach in beefing up wind protections. It increased the wind speed new homes must withstand to 140 miles an hour from 130—though Michael unleashed 155 mph winds.

The view from a window in Scott McElroy’s home, which he and his wife are rebuilding after it suffered extensive storm damage in Mexico Beach, Fla.

Leslie Chapman-Henderson, chief executive of the nonprofit Federal Alliance for Safe Homes, said she would have recommended matching the stricter standard in Miami-Dade County which mandates protecting homes against 175 mph winds.

Mayor Cathey said officials worried residents wouldn’t be able to rebuild if the requirements were too onerous. Pile on too many restrictions, and “you start weeding out some of the character of the city,” he said.

“We are an old, retired, vacation community,” said Bobby Pollock, 71, whose house took on 4 feet of water and is under repair. “We want to keep it this way.”

Pieces of dishware, tile, decorations and other personal effects Rex and Gayle Putnal have collected over the past six months from the area surrounding their former home.

For some residents, Mexico Beach’s character is already changed forever.

Paul Amedeo, 71, said he remains haunted by the death of his next-door neighbor—an ailing man in his 80s—in the hurricane. He recently put his damaged home, which lost its roof and facade but was covered by insurance, on the market and bought a house with his wife in Roswell, Ga. On a visit to their Mexico Beach home a month ago, his wife began crying as soon as she arrived.

“I can’t do this anymore,” she told him.

A damaged neighborhood and the Gulf of Mexico are seen from a window in Scott McElroy's home in Mexico Beach, Fla.

Write to Arian Campo-Flores at arian.campo-flores@wsj.com