HP isn't a new site/developing a community, but I do have some experience with this, haha. HP has a great community. Seriously, they're amazing. And it's one of the things the game is most frequently complimented on. But it wasn't always that way, and I've worked on other games that had a different experience.
I think the biggest things are:
1. The staff. They need to be welcoming, they need to enforce the rules evenly, and be interacting with the community in a positive way. Even if that just means sitting in chat and talking to people about their day, or making sure that every forum topic gets a reply.
2. No drama. Seriously enforce a zero tolerance drama policy. I'm not saying ban people with a flair for the dramatic, but the staff should NEVER be involved in it and you should work to shut it down when it starts. Drama kills online communities because the people who you actually want to play eventually can't stand it and leave (or never start playing in the first place). Any of you cutting back on your Facebook and Twitter time recently because it's always a giant troll-fueled mess? I know I am, and the same thing applies to games. Even if a player is not directly involved in the drama, they don't want to see it.
When someone flips their lid on you personally or the staff, even if it's public, don't feed the trolls. Be professional, but firm (don't be a doormat), and have someone else read your replies and tone-check you if you're worried. If they're freaking out, they want you to respond the same way so that they can start the drama. Just don't add any fuel to the fire and they will get bored and leave. This is kind of a generic example, but "I'm sorry you feel that way, but [insert reason why they can't have what they want]" is a great go-to answer.
But, the thing I think is especially serious, is stopping any drama between players when it's reasonable. If two players aren't getting along, that's their business. But if one of those players is telling other players that "so-and-so is terrible and oh my god can you believe what they did?!" it's bordering on cyberbullying and you need to put an end to it.
I guess what I'm saying is that it's important to find a balance between being a neutral third party, and knowing when it's needed for you to step in and stop things.
Also, if it's an option for you, implement a hellbanning system. It's honestly a lifesaver.
If you keep a level head, eventually you will weed out the people who feed on discord and you'll be left with the people who make up a great community. I know from experience that it's hard not to fall into the trap of wanting every player to like the game, and the players who cause problems appear to be the most active players in the community because they're always in chat/on the forums, and they're always the first to message you about something. But those players in a lot of cases are actively turning others off from your game.
I hope that helps someone!
When I opened HP, I was 15, so believe me when I say that HP didn't always have a great, drama-free community. It took lots of years for me to figure out what I was doing, haha. But those are really my best tips.
I've also bought games where the community hated the sale and they hated me because I was so different from what they were used to, and they didn't like me coming in and changing things. One of those games, I admitted failure and re-sold. The other one, I did get people to come around, but the game is now closed for different reasons.
If you've recently bought a game, or opened one, and it's not going well, just know that you can always start over with the community. Even if you have to be like look, I know that we've got some community problems, but here is how I want to work on them, and go from there.