News Corp, owner of The Wall Street Journal, HarperCollins and Realtor.com, said Monday it swung back to profitability in the fiscal fourth quarter after revenue gains in digital real estate services and book publishing helped offset a decline in print advertising sales.

Net income totaled $89 million for the period vs. $378 million of net loss a year ago.

Earnings per share, excluding some items, were 10 cents, lower than the 13 cents estimated by analysts who were polled by S&P Global Capital Intelligence.

Company-wide revenue for the quarter rose 5% to $2.2 billion despite the revenue of its largest business division, the news and information unit that produces the WSJ and New York Post, remaining flat.

The news and information unit’s revenue climbed 1% to $1.42 billion as advertising sales fell 5%.

Circulation and subscription revenues increased 5% as more digital subscribers ordered its products, including the WSJ, and prices were raised. The total number of The Wall Street Journal’s digital subscribers rose 26% to 948,000.

The book publishing unit, which operates HarperCollins, reported an 11% revenue gain to $433 million. Brisk sales of several popular titles — such as The Nest by Cynthia D’Aprix Sweeney, The Rainbow Comes and Goes by Anderson Cooper, The World’s Worst Children by David Walliams — contributed to the revenue gain, the company said. Digital sales represented 19% of consumer revenues for the quarter.

To lessen its dependence on publishing and advertising sales, News Corp, controlled by board chairman Rupert Murdoch, diversified its business in 2014 by buying Move Inc., owner of Realtor.com and Moving.com, for about $950 million.

Revenue for the acquired business, now called the digital real estate services unit, rose 21% to $229 million during the fourth quarter, proving to be the fastest growing part of the company.

Follow USA TODAY media reporter Roger Yu on Twitter @ByRogerYu.