Antibiotics

    Cephalexin (Keflex) After Surgery: What to Expect

    Cephalexin, sold under the brand name Keflex, is a first-generation cephalosporin antibiotic. It is frequently prescribed after dental procedures, skin surgeries, and orthopedic operations to prevent or treat bacterial infections. Understanding how to take cephalexin correctly helps ensure your course is effective and minimizes side effects.

    How Cephalexin Works

    • Cephalexin belongs to the cephalosporin class of antibiotics. It works by disrupting the construction of bacterial cell walls, causing the bacteria to break apart and die.
    • It is effective against many gram-positive bacteria, including Staphylococcus aureus (staph) and Streptococcus species, which are common causes of skin and wound infections.
    • Cephalexin is prescribed for skin and soft tissue infections, dental infections, urinary tract infections, respiratory tract infections, and infection prevention after certain procedures.
    • Typical adult dosing is 250 to 500 mg every 6 hours, or 500 mg every 12 hours for skin infections. Your provider will specify the dose and duration appropriate for your situation.
    • Take the full prescribed course even if you feel better before it is finished. Stopping early can allow surviving bacteria to cause a relapse.

    Taking Cephalexin Safely

    • Cephalexin can be taken with or without food. If it causes stomach upset, taking it with a meal reduces nausea.
    • Space doses evenly throughout the day to maintain consistent levels of the antibiotic in your bloodstream.
    • If you miss a dose, take it as soon as you remember. If it is almost time for the next dose, skip the missed dose. Do not double up.
    • Store cephalexin capsules and tablets at room temperature. If you received a liquid suspension, keep it refrigerated and shake well before each dose.
    • Tell your provider about all other medications you take. Cephalexin can interact with some blood thinners and probenecid (a gout medication), which can increase cephalexin levels in the blood.

    Side Effects and Allergy Warning

    • Common side effects include diarrhea, nausea, stomach discomfort, and headache. These are usually mild and improve as your body adjusts.
    • Taking a probiotic (such as Lactobacillus) during and after your antibiotic course may reduce diarrhea. Space probiotics at least 2 hours apart from antibiotic doses.
    • Cephalexin is a cephalosporin, which is chemically related to penicillin. If you have had a severe allergic reaction to penicillin (anaphylaxis, hives, throat swelling), tell your provider before taking cephalexin. Cross-reactivity is low but possible.
    • Signs of an allergic reaction to cephalexin include rash, hives, itching, swelling of the face or throat, and difficulty breathing. Stop the medication and seek emergency care immediately if these occur.
    • A serious but rare side effect is Clostridioides difficile (C. diff) colitis, which causes severe watery or bloody diarrhea. Contact your provider if you develop persistent or worsening diarrhea during or after your antibiotic course.

    Completing Your Course

    • Most post-surgical cephalexin courses last 5 to 10 days. Follow your provider's specific instructions for duration.
    • Do not share your antibiotic with others or save leftover doses for future use. Antibiotics prescribed for one infection may not be appropriate for another.
    • If your symptoms worsen, the infection spreads, or you develop a fever above 38.5 degrees Celsius (101.3 degrees Fahrenheit) while taking cephalexin, contact your provider promptly.
    • Dispose of unused antibiotic capsules at a pharmacy medication take-back location. Do not flush them down the toilet unless instructed, as antibiotic residue in water contributes to resistance.
    Frequently asked

    Questions patients ask.

    Can I take cephalexin if I am allergic to penicillin?

    Possibly, with caution. Cross-reactivity between penicillin and cephalosporins is real but uncommon, occurring in roughly 1 to 2 percent of people with penicillin allergy. If your penicillin allergy was mild (such as a rash), your provider may still prescribe cephalexin. If you had a severe reaction (anaphylaxis), your provider will likely choose a different antibiotic. Always disclose your allergy history before starting any antibiotic.

    What should I do if I miss a dose of cephalexin?

    Take the missed dose as soon as you remember. If it is close to the time of your next scheduled dose, skip the missed dose and continue as normal. Never take two doses at once to make up for one you missed. Consistent dosing helps maintain effective antibiotic levels and reduces the chance of treatment failure.

    Can I drink alcohol while taking cephalexin?

    Small amounts of alcohol are unlikely to interact directly with cephalexin in a dangerous way. However, alcohol can worsen antibiotic side effects like nausea and dizziness, and impairs immune function, which can slow recovery. It is best to avoid or limit alcohol during your antibiotic course.

    Why is my provider prescribing cephalexin after dental work?

    Dental procedures can introduce bacteria from the mouth into the bloodstream. For patients at risk of infection in prosthetic joints, heart valves, or surgical implants, providers may prescribe a short course of cephalexin or a similar antibiotic to prevent bacteria from reaching vulnerable tissues. This is called antibiotic prophylaxis.

    For patients

    Get a personalized care plan.

    This guide provides general information. For instructions tailored to your specific procedure, ask your provider about QR Rx care plans.

    These medication guides are for educational purposes only and do not replace medical advice. Always follow your healthcare provider's specific medication instructions.