Fans won’t have to say goodbye to Harry Potter when he leaves the megaplex.

Warner Bros. made sure its long-running franchise will continue to mint money for the studio for years to come.

In Orlando, it’s in the midst of building The Wizarding World of Harry Potter, a $200 million theme park inside Universal’s Islands of Adventure set to open next spring.

The 20-acre venture will feature a slew of rides, restaurants and attractions based on the books and films, including a 150-foot recreation of Hogwarts Castle and Hogsmeade Village. Rides will feature castmembers from the pics.

But Warner Bros. is also going after fans who can’t make the trek to Florida.

In April, it launched “Harry Potter: The Exhibition” at the Museum of Science and Industry in Chicago. The exhibit will travel the U.S. and overseas, and features more than 200 props from the pics, including Harry’s wand and eyeglasses, and film sets, such as Hagrid’s Hut. It’s expected to continue on in some form once the films have ended their runs.

The purpose of the theme park and traveling showcase isn’t just to keep Harry Potter alive in various forms, but also help Warner Bros. move a lot of merchandise — toys, clothing and collectibles — which will keep its consumer products division busy.

While the films have earned $4.5 billion at the box office, and DVDs have sold another $2.7 billion, its licensing program around the films also has generated several billion dollars for the studio since the first film bowed in 2001. And it’s a cash cow the company clearly doesn’t want to give up.

That includes a series of videogames, which have earned more than $1 billion. Electronic Arts has collected most of that coin, considering it owns the rights to publish the games.

But it wouldn’t be surprising if Warner Bros. winds up eventually producing Harry Potter games once the final films bow in 2011.

The studio has been aggressively reinvigorating its inhouse videogame business, buying publishers and snatching up rights to make “The Lord of the Rings” games, which had been at EA.

Its aim is to fully exploit the company’s franchises, which includes making versions of its “Batman” property that will satisfy various audiences, from kids to adults.

It already plans to produce a Lego videogame version of “Harry Potter” through TT Games, which produced popular Lego installments of “Batman,” “Star Wars” and “Indiana Jones.”