E. Coli Treatment: Medication, Lifestyle Changes, and More

E. Coli Treatment: Medication, Lifestyle Changes, and More

E. Coli Treatment: Medication, Lifestyle Changes, and More
iStock (2); Getty Images
E. coli (Escherichia coli), a group of bacteria that lives in your gut, can be good and bad. Most strains of E. coli do not harm us and actually help our digestive system work properly. Others may cause infection, leading to stomach pain, diarrhea, and more serious health issues.

Not all E. coli infections impact the body in the same way, so not all E. coli infections are treated the same way. Here are the most common — and effective — strategies for treating and preventing various E. coli-related illnesses.

Talk to your doctor about what type of E. coli treatment might be best for you.

Surprising Signs Your Gut Is Unhealthy — and What to Do About It

An unbalanced gut can throw off the health of your entire body, but the symptoms aren’t always obvious. Learn to recognize — and deal with — three especially sneaky signs.
Surprising Signs Your Gut Is Unhealthy — and What to Do About It

Medication

Depending on the type of E. coli infection you have, appropriate medications can vary. Some infections may resolve on their own. Antibiotics may be prescribed for some but cause complications for others.

Urinary Tract Infections

A urinary tract infection (UTI) can occur when some strains of E. coli enter the urinary system. This is the most common infection caused by E. coli.

Doctors typically treat UTIs with a range of antibiotics. Which antibiotic they prescribe depends on the type of infection and patient characteristics, says Mahesh Polavarapu, MD, medical director of emergency medicine at NewYork-Presbyterian Westchester in New York. UTIs are classified as uncomplicated if they are mild and occur in otherwise healthy women and as complicated UTIs if they occur in males, children, pregnant people, and people with a weakened immune system, he says.

“Uncomplicated UTIs are typically treated with oral antibiotics and for a short period of time,” Dr. Polavarapu says. “Complicated UTIs are treated for a longer period of time and may require IV antibiotics.”

Some antibiotics used to treat uncomplicated E. coli–associated UTIs include:

  • sulfamethoxazole and trimethoprim (Bactrim, Bactrim DS)
  • fosfomycin (Monurol)
  • nitrofurantoin (Furadantin, Macrobid, Macrodantin)
  • cephalexin (Biocef, Daxbia, Keflex, Keftab)
A three-day course of antibiotics can successfully treat most UTIs, with symptoms subsiding after a few doses.

Some strains of E. coli, called extended-spectrum beta-lactamase (ESBL) E. coli, are resistant to many antibiotic treatments.

In these cases, or those coupled with a kidney infection, your doctor may prescribe a fluoroquinolone. Medications in this class include:

  • ciprofloxacin (Cipro)
  • levofloxacin (Levaquin)

Ask your doctor about the potential side effects of fluoroquinolones. “The one that we ensure patients are aware of is the risk of tendinopathy, or tendon pain or reduced function without rupture, and tendon rupture,” Polavarapu says. “The more common side effects are gastrointestinal, like nausea, vomiting, diarrhea, and dyspepsia [indigestion].”

In severe UTI cases, you may be prescribed:

  • ceftriaxone (Ceftrisol Plus, Rocephin)

  • piperacillin-tazobactam (Zosyn)

  • carbapenems

E. Coli–Related Traveler’s Diarrhea

Traveler’s diarrhea often occurs when an individual visits another country and is exposed to bacteria (most often a strain of E. coli called enterotoxigenic E. coli, or ETEC) via food or water with which their body has little to no familiarity.

In addition to hydration, treatment may include antidiarrheal drugs such as loperamide (Imodium). This medication is not advised for people who have a fever, have bloody stools, or are age 18 or younger.

A healthcare professional may prescribe antibiotics only if you have three or more loose stools in an eight-hour period or severe symptoms, including fever, dehydration, or blood or mucus in the stools. Medications may include:

  • ciprofloxacin (Cipro)
  • levofloxacin (Levaquin)
  • azithromycin (Zithromax, Zmax)
  • rifaximin (Xifaxan)

Intestinal E. Coli Infections

Some intestinal E. coli infections, such as those caused by Shiga toxin-producing E. coli, or STEC, do not require medication.

In fact, treating these cases with antibiotics may increase your risk of developing hemolytic uremic syndrome (HUS).

It’s also important not to treat STEC infections with over-the-counter antidiarrheal medication, which also can increase your risk of developing HUS.

 Antidiarrheal medication slows down the digestive system and may keep toxins in your body.

Hemolytic Uremic Syndrome

When HUS occurs, toxins destroy red blood cells, disrupting the kidneys’ filtering system and possibly causing kidney failure. HUS affects 5 to 15 percent of people with diarrhea from an E. coli infection, primarily children ages 5 and younger and adults ages 60 or older.

HUS requires prompt medical treatment, which may include fluid replacement, blood or platelet transfusion, and kidney dialysis.

Most people with HUS who receive appropriate, timely treatment recover fully, especially children. Some do have lasting kidney damage.

 If that occurs, a healthcare professional may recommend medication to lower blood pressure and help prevent kidney damage.

When there are complications, HUS may be treated with eculizumab (Soliris). This helps prevent further blood vessel damage, but it requires a vaccination to prevent meningitis, a potential side effect.

Neonatal Meningitis

E. coli is the second-leading cause of neonatal bacterial meningitis, behind group B streptococcus (GBS). Neonatal bacterial meningitis occurs in just 0.02 percent of full-term pregnancies. It does require treatment, with a mortality rate of 5 to 20 percent after treatment.

If neonatal meningitis is suspected, a healthcare professional will draw blood and perform a spinal tap (also called a lumbar puncture) to test spinal fluid for E. coli bacteria. If bacterial meningitis is confirmed, treatment includes fluids, rest, and antibiotics.

Medication may include:

  • ampicillin (Principen)
  • cefotaxime (Claforan)
  • gentamicin (Garamycin)

Other Conditions

E. coli may result in other infections that require medication. These include:

  • Bloodstream Infections These may occur when E. coli enters the bloodstream. In addition to IV therapy, medication to treat these infections may include cefepime and carbapenem.

  • Sepsis An E. coli infection can progress to this extreme bodily response, especially for people with chronic health conditions or those younger than 1 year old or age 65 or older. It requires immediate medical attention, which can include antibiotics, in addition to oxygen and IV fluids.

  • Abdominal Infections E. coli infections are a leading cause of peritonitis, the inflammation of the abdominal cavity. Medications used to treat these include ampicillin (Principen), cefotaxime (Claforan), ceftriaxone (Rocephin), and ertapenem (Invanz).

  • Prostate Infections Bacterial prostatitis, or an inflamed prostate, can be treated with antibiotics. Typical duration of antibiotic treatment is four to six weeks.

  • Pelvic Inflammatory Disease (PID) Typically occurring in women under age 35, PID often is a complication of a sexually transmitted infection (STI) but can be the result of an E. coli infection. It typically is treated with antibiotics.


Lifestyle Changes

While preventive measures for E. coli infections are the same for everyone, pregnant women, newborns, children, the elderly, and individuals who have a compromised immune system have a higher risk of contracting a foodborne E. coli illness.

Ways to reduce your risk include:

  • Washing your hands thoroughly
  • Keeping cooking surfaces clean and separate
  • Cooking food thoroughly
  • Washing produce
  • Chilling warm or hot food promptly if you’re done eating or not eating it right away
  • Avoiding unpasteurized dairy and juices
  • Not swallowing water when swimming

Preventing E. Coli–Related Traveler’s Diarrhea

Take certain precautions when going abroad to avoid contracting traveler’s diarrhea. Areas of Central and South America, Mexico, Africa, the Middle East, and South and Southeast Asia are considered high-risk destinations, with some risk in Eastern Europe and a few Caribbean islands.

Precautions include avoiding:

  • Food from street vendors
  • Moist foods that are at room temperature, such as sauces
  • Unpasteurized dairy products
  • Raw or undercooked meat or seafood
  • Salads and unpeelable fruits, such as berries and grapes
  • Beverages that contain ice cubes
While the above tips are good for all, know that certain groups of people are more prone to developing traveler’s diarrhea. That includes people with diabetes, inflammatory bowel disease, liver disease, kidney disease, heart disease, or a weakened immune system. Individuals on acid blockers or antacids are also at an increased risk because the reduction in stomach acid can make it easier for bacteria such as E. coli to survive.

Graphic titled, E. coli prevention tips, illustrated points include wash hands thoroughly, cook food all the way through, rinse produce, keep cooking surfaces clean, refrigerate cooked food, don’t swallow pool water, and avoid unpasteurized dairy and
Everyday Health

Rehabilitation and Therapy

The following therapies can be done at home to aid recovery from an E. coli infection:

  • Stay hydrated. Drink plenty of clear liquids, including water and broths, and avoid coffee, alcohol, and apple and pear juices.
  • Get plenty of rest. Give your body a break so it can do its best fending off the infection.
  • Temporarily adjust your diet. Although you can return to regular meals when you are feeling better, your symptoms may improve if you avoid dairy products and fatty, high-fiber, and highly seasoned foods.
Most healthy adults can completely recover from an E. coli infection after about a week.

 It’s important to contact a medical professional if you have symptoms that include:

  • A fever higher than 102 degrees F
  • Bloody stools or urine
  • Vomiting or diarrhea that lasts more than two days
  • Signs of dehydration, such as infrequent urination or dark urine
  • Signs of hemolytic uremic syndrome (infrequent urination, unexplained rashes or bruising, irritability, decreased awareness, loss of color in the cheeks, and fatigue)

Pain Management

Pain from E. coli infections can range from mild discomfort to more serious pain in your stomach and elsewhere.

Pain-relievers such as acetaminophen and ibuprofen may ease cramps and discomfort for UTIs and gastrointestinal infections.

Anti-nausea medication also may be appropriate for gastrointestinal issues, Polavarapu says.

“Other medications that relax gut muscles are available, but you should be seen by a healthcare professional to see if they are right for you,” he says.

Phenozopydrine could address the burning sensation of a UTI, Polavarapu says, though it will not reduce the infection itself.

The Takeaway

  • E. coli bacteria can help our bodies, but it also can cause diarrhea, stomach pain, and infections.
  • Many E. coli infections do not require treatment beyond rest and hydration and may resolve in a week. Some also require antibiotic treatment.
  • Anti-diarrheal medications and antibiotics are not recommended for certain E. coli infections and can actually make them worse.
  • Contact your doctor if your symptoms include bloody diarrhea or urine, a high fever, or signs of severe dehydration.

Resources We Trust

Additional reporting by Joseph Bennington-Castro and Tony Stasiek

EDITORIAL SOURCES
Everyday Health follows strict sourcing guidelines to ensure the accuracy of its content, outlined in our editorial policy. We use only trustworthy sources, including peer-reviewed studies, board-certified medical experts, patients with lived experience, and information from top institutions.
Resources
  1. E. Coli Infection. Cleveland Clinic. November 22, 2023.
  2. Treatment of E. Coli Infection. Centers for Disease Control and Prevention. May 14, 2024.
  3. Bush L et al. Escherichia coli Infections. Merck Manual. June 2024.
  4. Urinary Tract Infections in Adults. Urology Care Foundation. November 2022.
  5. Urinary Tract Infections Treatment and Diagnosis. Mayo Clinic. September 14, 2022.
  6. About ESBL-producing Enterobacterales. Centers for Disease Control and Prevention. April 11, 2024.
  7. Sabin A et al. Complicated Urinary Tract Infections. StatPearls. December 7, 2024.
  8. Kaye KS et al. Effect of Cefepime/Enmetazobactam vs Piperacillin/Tazobactam on Clinical Cure and Microbiological Eradication in Patients With Complicated Urinary Tract Infection or Acute Pyelonephritis. JAMA. October 4, 2022.
  9. Gotfried J. E. coli Gastroenteritis. Merck Manual. June 2023.
  10. Gotfried J. Traveler's diarrhea. Merck Manual. June 2023.
  11. Myojin S et al. Interventions for Shiga toxin-producing Escherichia coli gastroenteritis and risk of hemolytic uremic syndrome: A population-based matched case control study. PLoS One. February 4, 2022.
  12. E. Coli. Mayo Clinic. October 1, 2022.
  13. Hemolytic Uremic Syndrome. Cleveland Clinic. June 24, 2024.
  14. Hemolytic Uremic Syndrome Diagnosis and Treatment. Mayo Clinic. September 8, 2023.
  15. Hemolytic Uremic Syndrome Symptoms and Causes. Mayo Clinic. September 8, 2023.
  16. Brenda L. Tesini. Neonatal Bacterial Meningitis. Merck Manual. July 2022.
  17. Meningitis Infections in Infants and Children. HealthyChildren.org. July 2023.
  18. Frescas BE et al. Outcomes associated with empiric cefepime for bloodstream infections caused by ceftriaxone-resistant, cefepime-susceptible Escherichia coli and Klebsiella pneumoniae. International Journal of Antimicrobial Agents. February 18, 2023.
  19. Septicemia. Johns Hopkins Medicine.
  20. Li P K-T et al. ISPD peritonitis guideline recommendations: 2022 update on prevention and treatment. Peritoneal Dialysis International. March 10, 2022.
  21. Auwaerter PG et al. Ceftriaxone. Johns Hopkins Medicine. November 12, 2023.
  22. Prostatitis. Mayo Clinic. February 22, 2025.
  23. Bush L et al. Pelvic Inflammatory Disease (PID). Merck Manual. October 2023.
  24. How to Prevent E. coli Infection. Centers for Disease Control and Prevention. May 14, 2024.
  25. About Four Steps to Food Safety. Centers for Disease Control and Prevention. April 29, 2024.
  26. Traveler's Diarrhea. Mayo Clinic. January 18, 2025.
  27. E. Coli. Mayo Clinic. October 1, 2022.
  28. Symptoms of E. coli Infection. Centers for Disease Control and Prevention. May 14, 2024.
  29. Ibuprofen and acetaminophen (oral route). Mayo Clinic. February 28, 2025.
  30. Treatment for Bladder Infection in Adults. National Institute of Diabetes and Digestive and Kidney Diseases. April 2024.
  31. Phenazopyridine (oral route). Mayo Clinic. February 28, 2025.
jane-yoon-scott-bio

Jane Yoon Scott, MD

Medical Reviewer

Jane Yoon Scott, MD, is an infectious disease physician and an assistant professor of medicine at Emory University in Atlanta. Dr. Scott enjoys connecting with her patients, empowering them to understand and take ownership of their health, and encouraging them to ask questions so that they can make informed and thoughtful decisions.

She graduated with the highest honors from the Georgia Institute of Technology, then received her MD from the Medical College of Georgia. She completed her internal medicine residency training and chief residency at Temple University Hospital, as well as a fellowship in infectious diseases at Emory University. She is board-certified in both internal medicine and infectious diseases.

When she is not seeing patients, Dr. Scott works with neighboring health departments to promote public health, especially to communities that have been historically underserved. She also teaches medical trainees and lectures medical students at the Emory University School of Medicine.

In her free time, Dr. Scott appreciates a good coffee shop, weekend hikes, playing guitar, strolling through cities, sampling restaurants, and traveling to new places.

Holly Pevzner

Holly Pevzner

Author

Holly Pevzner is a writer who specializes in health, nutrition, parenting, and pregnancy. She is currently a staff writer at Happiest Baby. Her work, including essays, columns, features, and more, spans a variety of publications, websites, and brands, such as EatingWell, Family Circle, Fisher-Price, Parents, Real Simple, and The Bump. Pevzner has written several monthly health columns, including for First for Women and Prevention magazines. She previously held senior staff positions at Prevention, Fitness, and Self magazines, covering medical health and psychology. She was also a contributing editor at Scholastic's Parent & Child magazine.