A study has found that fiber-rich foods, such as vegetables, beans, and whole grains, promote healthy gut bacteria that protect against harmful infections like E. coli and Klebsiella pneumoniae. These beneficial bacteria produce short-chain fatty acids that help prevent disease-causing microbes from thriving. The research suggests that increasing fiber intake may reduce infection risk more effectively than probiotics, by altering the gut environment to become less hospitable to harmful bacteria.

Feeding your good gut bacteria through fiber in diet may boost body against infections
A new study has found that the composition of your gut microbiome helps predict how likely you are to succumb to potentially life-threatening infection with Klebsiella pneumoniae, E.coli and other bugs -- and it may be altered by changing your diet.