Here's how Danny DeVito saved 'It's Always Sunny in Philadelphia' from getting canceled

“It’s Always Sunny in Philadelphia” is in the midst of its 10th season, making it one of the longest-running live-action comedy shows in television history.

But the show’s success almost didn’t happen if not for a strange bit of luck, brought upon by its network, FX.

Rob McElhenney, Glenn Howerton, and Charlie Day are the creators, writers, actors, and producers of the show, but when they were starting out in 2006, they weren’t big enough names to draw in audiences.

McElhenney and Howerton recently joined The Nerdist podcast and explained that after a first season with low ratings, FX gave them an ultimatum: add a star name to bring in audiences or the show is over.

McElhenney recalled the conversation:

“So, John Langroff, who’s the president of FX, he called me in for a meeting and was like, ‘Hey, no one’s watching the show, but we love it, we wanna keep it on, but we don’t have any money for marketing, and we need to add somebody with some panache that we can hopefully parlay into some public relations story, just so we can get people talking.'”

McElhenney continues, saying he, Howerton, and Day were hesitant to add a big name and change the way they were writing and making the show. He says FX threw around some names, including Danny DeVito.

Danny DevitoAlberto E. Rodriguez/Getty ImagesHowerton says DeVito was perfect for the role because he had played so many ‘despicable characters,’ but had a warmth underneath that they felt fit the show’s tone.

“It’s not that we were reticent to the idea of adding Danny to the show,” explains Howerton, “it’s that we were reticent to add a name to the show. You know, because we kinda liked that we were no-names and it was this weird, small thing, you know.”

McElhenney says they told FX: “No, I just don’t think we wanna do that, and they were like, ‘Oh OK, well, you know… the show’s over.'”

McElhenney, Howerton, and Day then opened up to the idea and talked to DeVito, who apparently already knew about the show because his kids watched it.

Howerton says DeVito was perfect for the role because he had played so many “despicable characters,” but had a warmth underneath that they felt fit the show’s tone.

DeVito joined the show for the second season, playing Frank Reynolds, the legal father of twins Dennis and Sweet Dee.

In 2014, Entertainment Weekly ranked “It’s Always Sunny” No. 7 on its list of the “26 Best Cult TV Shows Ever,” noting, “it’s a great underdog story … If it sounds too dark for you, consider that there’s an episode about making mittens for kittens, and it’s adorable.”

NOW WATCH: HBO just released another new trailer for ‘Game of Thrones’

NOW WATCH: Briefing videos

Business Insider Emails & Alerts

Site highlights each day to your inbox.

Follow Business Insider Australia on Facebook, Twitter, LinkedIn, and Instagram.