Struggling department store operator Bon-Ton Stores has replaced CEO Kathryn Bufano, brought in less than three years ago to lead the company.

William Tracy, Bon-Ton’s chief operating officer, will become president and CEO of Bon-Ton, which is the parent company of Boston Store, Younkers and other department stores, when Bufano’s contract expires Aug. 25.

Tracy will become Bon-Ton’s fourth CEO since 2012.

Bon-Ton said Bufano, who resigned, will remain with the company as CEO through a transition period “to ensure an orderly and effective leadership transition.”

Bon-Ton, which has dual headquarters in Milwaukee and York, Pa., has been unprofitable for the past six years. It is among many retailers trying to adjust to online competitors such as Amazon.com and the changing behavior of consumers.

The announcement of the pending departure of Bufano comes after Bon-Ton said last week that Tim Grumbacher, the longtime chairman of the retailer and descendant of its founder, will retire and will be succeeded by his wife and board member, Debra K. Simon.

Simon joined the Bon-Ton board about a year ago. She had been a…