Take that Amazon. Walmart is doubling down on its hometown of Bentonville, Ark.

One week after Amazon announced, with great fanfare, that it is planning to build a second headquarters in a city offering the best perks, Walmart said on Friday that it is replacing its aging headquarters in Bentonville with a new one.

In a note to employees on Friday, Walmart’s chief executive, Doug McMillon, said the company’s current corporate campus — a hodgepodge of more than 20 buildings spanning several communities — are “significantly beyond their shelf life.”

The new home office, centered on 350 acres, will be better suited to a more “digitally native work force,” he said.

“You’ll see improved parking, meal services, fitness, and natural light — yes, natural light,” Mr. McMillon wrote.