SAN FRANCISCO — Music publisher Warner/Chappell Music Inc. has agreed to pay $14 million to settle a class action challenging ownership rights to the song “Happy Birthday to You.”

Warner/Chappell has also agreed to the entry of a judgment that would declare that the most popular song in the English language is in the public domain, according to court papers filed Monday.