1.
above all; more than anything
Marks one thing as the most important or the best of all: 何よりも大切 (more important than anything).
2.
the best thing; wonderful (that ~)
After a clause or noun with で, says that something is the best possible outcome, as in ご無事で何よりです (I am so glad you are safe).
Common patterns
- 何より(も)〜: more ~ than anything
- 〜で何よりです: I am glad that ~ (a set phrase of relief and good wishes)
- 何よりの〜: the best ~ (何よりのプレゼント, the best present)
Usage
Sense 2 is a fixed, slightly formal courtesy phrase: ご無事で何より, お元気で何より. It expresses relief at someone else's good fortune, so it is not used about oneself.