Like many others, both of my kids started whining when they were toddlers. It always bothered me when they whined. I tried the usual "ask nicely" response, but over time they still reverted to whining when they were upset or frustrated. I was so ready to be done with whining.
About 4 years ago, when my kids were 4 and 7 years old, I read Nicholeen Peck's book, A House United: Changing Children's Hearts and Behaviors by Teaching Self-Government. This excellent book inspired me to change our home culture for the better and I used the methods from the book to improve my children's self-government. I decided to use the same methods to teach my kids to stop whining.
The Basic Methods
In A House United, there is a strong emphasis on teaching children that they are responsible for their own actions and that they have the power to choose how they want to be. Teaching kids to govern themselves involves setting very clear expectations and then having consequences (such as chores) when the child does not fulfill the expectations.
To tackle the whining problem, at a time when everyone was calm and happy, I talked with my kids about how:
whining ruins everyone's mood,
I wanted to help them learn to communicate their needs in a better way,
the kids can choose how they communicate, so if they choose to whine, then they will have consequences, but they could instead choose better ways to communicate, and
I would give them opportunities to "try again" when they wanted to express something without whining.
My kids were given a few days to get used to the idea and start working on how they wanted to speak. I made it clear that, after a few days, they would begin to earn consequences (chores) whenever they chose to whine. And that whining or complaining about the chores they had earned would result in more chores.
Putting It Into Practice
Once my expectations were made clear and my kids had a little time to practice communicating in better ways, it was time for the follow through. Over the next few months, I tried to consistently respond to whining by assigning chores whenever my kids whined, and giving them plenty of opportunities to "try again". The process also involved me strengthening my own habits of remaining calm when responding to whining, being willing to take the time to follow through with the whining consequences, and making sure to praise the children for the chores they accomplished.
All of this needed to be done with a loving (or at least neutral) attitude, so that my children really internalized the idea that the chores were being used as a way to help them learn to make better choices. In advance of activities which were likely to lead to whining (such as the whining kids often do when it is time to leave the park or a playdate), I made sure to reinforce my expectation that the kids would not whine and would respond politely when it was time to leave. The process wasn't always followed perfectly, but inch-by-inch we made headway.
By applying these methods as consistently as possible, my children really did learn to communicate without whining. Whining came to be a non-issue. For the last few years now, my children have generally just not whined, and instead have chosen to express their feelings in a more polite way. There may still be occasional slight whining, but it is very quickly nipped in the bud and my kids know how to make themselves respond differently. On the vast majority of days, whining never happens at all. And that makes all of our lives more pleasant and peaceful.