The quotation began to appear during the 20th century and post-dates Wilde by decades.
Its various sources provide a good illustration of how myths evolve: in 1951 the “The Saturday Review” ascribed the remark to George Bernard Shaw without any source; then in 1970 “Film Quarterly” by now assuming it was a Shaw quotation used it in a sidebar to an article about the movie director Billy Wilder; then in a 2003 a self-help book only vaguely sure of it sources convinced itself that Billy Wilder had said it; finally modern day meme writers perhaps oblivious to Billy Wilder assumed therefore it must be Oscar Wilde, after all he said everything else. Or, as Dorothy Parker put it: [1]
If, with the literate, I am
Impelled to try an epigram,
I never seek to take the credit;
We all assume that Oscar said it.
[1] ‘A Pig’s-Eye View of Literature: Oscar Wilde’, Life, June 2, 1927.
Again, the Quote Investigator can be relied upon, finding that the likelihood seems to be Shaw, but without firm evidence. See the link below for the complete review.
SHAW DID PLAGIARIZE WILDE
We cannot entirely rule out Wilde as the original source, however, as Shaw was known to “borrow” from Wilde. Below are two examples of lines and ideas that appeared in Wilde’s plays, which later “reappeared” in Shaw a decade later. Perhaps Dorothy Parker was right.