No one wants to have irritable bowel syndrome (IBS), but if you take some preventive measures, you may be able to avoid it. Stress, anxiety, or eating and drinking the wrong things can cause digestive problems. You can find long-term solutions by making some simple changes in how you respond to stress and paying attention to your diet, nutrition, and lifestyle.

Take a look at these seven tips to keep your flare-ups at bay.

Stress-related symptoms—like abdominal pain and bloating—occur more often and more intensely in people with IBS. Managing the stress in your life is important in avoiding flare-ups.

There are several effective methods for stress management that can improve IBS symptoms, including deep breathing and yoga. The secret is to breathe from your diaphragm, not your chest, to relax your abdominal muscles. Doing so can lead to more regular bowel activity.

Another stress soother is called progressive relaxation, or Jacobson’s relaxation technique. Relaxing the muscles in your body can help alleviate an upset stomach.

To use this form of relaxation, start by tensing and then relaxing the muscles in your feet. Then move your way up through your calves, thighs, abdomen, arms, and each main muscle group in your body, ending with your face and scalp. Concentrate on releasing all of the tension in each body part as you go.

Don’t be afraid to seek outside help! In counseling, a psychiatrist helps you beat stress by examining how you respond to life events, and guiding you toward more effective responses.

Biofeedback is built on the concept of “mind over matter.” During this type of therapy, a machine helps slow your heart rate and reduce muscle tension. It also teaches you how to make these changes yourself.

In addition to stress management techniques, tweaking your diet can also help prevent IBS. One of the most common ways is to incorporate more fiber into your meals.

However, while dietary fiber can ease some gastrointestinal symptoms (like constipation), it can make other symptoms worse (like gas and cramping). To minimize potential problems, try a gradual increase of fiber over the course of a few weeks.

Certain foods are known to make IBS symptoms worse. Watch what makes your own symptoms worse, and avoid those products.

Some common culprits include:

  • chocolate
  • sugar-free sweeteners (such as sorbitol or mannitol)
  • cauliflower
  • broccoli
  • cabbage
  • beans

Some people also have trouble with dairy. You can try substituting yogurt for milk, or decreasing the quantity of dairy products you consume. Other things that might work are breaking down lactose with an enzyme product, or combining dairy with other foods.

While drinking enough fluids each day helps IBS symptoms, not all fluids have the same effect on your stomach. Water soothes stomach distress, but several other beverages can cause problems, including:

  • alcoholic drinks
  • coffee, tea, and other caffeinated drinks
  • carbonated drinks like soda

Alcohol and drinks with caffeine may make diarrhea worse. Soda and other drinks with carbonation can cause gas.

While these seven tips may not always bring instant relief, they can result in long-term solutions over time. Try different techniques to ease your stress and improve your diet to relieve your IBS symptoms. You can help to control your condition by making healthy choices.