Where does the phrase “living the life of Riley” come from and What does it mean?

There is excellent reason for the belief that the gentleman who gave life to this modern expression was given the name “Reilly” by his creator, not “Riley,” but as he lived only in song and the pronunciation was the same no one will cavil over the spelling.

The original song which seems to have given our present meaning, living luxuriously, was popular in the 1880s. It was a comic song, “Is That Mr. Reilly?” written by Pat Rooney.

The song described what its hero would do if he suddenly “struck it rich.” Some of the lines ran, “I’d sleep in the President’s chair,” “A hundred a day would be small pay,” “On the railroads you would pay no fare,” “New York would swim in wine when the White House and Capitol are mine.”

At the close of each verse there was a spoken line such as, “Last night while walking up Broadway the crowds shouted,” and then the chorus would follow:

Is that Mister Reilly, can anyone tell?
Is that Mister Reilly that owns the hotel?
Well, if that’s Mister Reilly they speak of so highly,
Upon my soul Reilly, you’re doing quite well.