The best way to manage constipation is to prevent it. There are a number of preventative options to choose from.
Dietary changes such as increasing fluids and dietary fibre can help you stay regular. Fibre comes in two types: soluble, found in fruits and vegetables, and insoluble, found in grains, legumes, and some laxatives. Insoluble fibre adds bulk to stools and may help food pass through the stomach and intestines more quickly. Soluble fibre mixes with stomach contents and attracts water, giving it a gel texture, which slows digestion.
Regular physical activity helps stimulate bowel movement. As little as 30 minutes of walking a day can improve your bowel function.
Try establishing a regular routine for bowel movements. Because bowel movements usually occur when you first get up in the morning or following breakfast, try to give yourself enough uninterrupted time for bowel movement during this optimal time of day.
And if you have made appropriate lifestyle changes and still can't get things moving again, consider laxatives such as stimulants, stool softeners, osmotics, saline salts (magnesium salts), lubricants, bulk-forming laxatives, and enemas. Your doctor or pharmacist can advise you about the best option for you.