Eat foods high in fiber to avoid constipation, such as beans and whole-grain breads and pastas, recommends WebMD. All fruits and vegetables have fiber in them as well, so adding fruits and vegetables to your diet can also help prevent constipation, although you should add fiber to your diet gradually to avoid feeling bloated.
The colon absorbs water from food, states WebMD. However, when this process is slowed, the intestines absorb too much water, causing the stool to become hard and difficult to pass, which causes constipation. Adding fiber to the diet helps with this process, because the digestive system cannot digest fiber. Instead, it's passed with the rest of the stool, adding extra bulk to the stool and making it softer and easier to pass.
Have 2 cups of fruit and 2 1/2 cups of vegetables a day, recommends WebMD, including pears, apples, dates and sweet potatoes. Beans have a lot of fiber, so have a bean or legume dish one to two times a week. Consider whole-grain cereal or another cereal high in fiber, whole-wheat pasta, and foods made out of brown rice. Drink plenty of water, and consider bulk-forming laxatives, although they may interfere with prescription medications.