By Jessica DiNapoli

NEW YORK (Reuters) - Gawker Media LLC won approval from a U.S. bankruptcy court judge on Thursday to begin a process to sell itself, allowing the online publishing pioneer to begin an auction that is expected to attract several bidders.

Gawker filed for bankruptcy mainly to shield itself from a $140 million judgment from former professional wrestler Hulk Hogan, who won the judgment after Gawker published an excerpt of his sex tape.

Gawker filed for bankruptcy last month with an offer from media publisher Ziff Davis LLC to buy the company for $90 million, setting the floor for a court-supervised auction.

The company could not pursue potential other offers until judge Stuart Bernstein approved the mechanism for the auction, as well recognized Ziff Davis' stalking horse bid, according to court papers.

Reid Snellenbarger, a managing director at Houlihan Lokey, Gawker's investment bank, told the court that his firm has a list of 40 potential buyers that it plans to market Gawker to, seeking a better offer than Ziff Davis'.

Snellenbarger said he and his co-workers had discussed a sale before the company filed for bankruptcy with several other buyers, a number of which said that they would not want to make the first offer, but would participate in the auction later.

Bids for Gawker are due Aug. 15, with an auction scheduled for the following day, Gregg Galardi, an attorney for Gawker said in court.

Bernstein initially took issue with the limited time that the company's investment bankers spent trying to find a buyer before bankruptcy, and expressed concern over the protections Gawker granted to Ziff Davis as part of the sale agreement.

"I'm not going to approve these procedures," Bernstein said.

Galardi, however, argued that rejecting the process Gawker had proposed would throw the company into disarray, with advertisers abandoning it.

After a brief negotiation among attorneys for Ziff Davis and Gawker outside the court, a new deal was reached limiting the protections Ziff Davis will receive.

(Reporting by Jessica DiNapoli in New York; Editing by Bernard Orr)