What You Need to Do Before You Start
Replacing a medicine cabinet means removing the old one and installing a new one in the same opening. The job takes two to four hours and requires basic tools you likely have at home — a screwdriver, a utility knife, a level, and a stud finder if your cabinet will be mounted between studs. You do not need to hire a contractor unless the opening is damaged or the wall needs repair.
Before you buy a new cabinet, measure the opening width, height, and depth. Measure three times — at the top, middle, and bottom of the opening. If the measurements vary by more than a quarter inch, the opening is out of square and you may need a cabinet with adjustable trim. Write down whether your opening is recessed (set into the wall) or surface-mounted (sitting on top of the wall). A recessed cabinet fits inside the wall cavity; a surface-mounted cabinet sits flush against the wall surface.
Turn off the power to any outlets inside the old cabinet by switching off the breaker. If you are not sure which breaker controls them, turn off the main breaker to be safe. Test the outlets with a non-contact voltage tester to confirm the power is off before you touch anything inside.
Key Takeaways
- Measure the opening width, height, and depth at three points each before you buy a replacement cabinet, because out-of-square openings need special trim.
- Turn off power to any outlets inside the old cabinet and test them with a voltage tester before you remove anything.
- Remove the old cabinet by unscrewing it from the wall studs, then patch and sand the wall before installing the new one.
- Install the new cabinet level and plumb (straight up and down), then find it to the studs with the screws provided, not drywall anchors.
- Caulk the seams between the cabinet trim and the wall to prevent moisture from entering the wall cavity.
Removing the Old Cabinet
Open the cabinet door and look inside for screws holding the cabinet to the wall. Most cabinets are fastened through the sides or through a mounting rail at the top and bottom. Unscrew all fasteners and set them aside. If the cabinet is caulked to the wall, run a utility knife along the caulk line to break the seal, then pull the cabinet straight out toward you. Have someone help you support the weight as you pull — a full cabinet can weigh 30 to 50 pounds.
Once the cabinet is out, you will see the wall opening and the studs on either side. If there are electrical outlets inside the opening, disconnect them by unscrewing the wire nuts and pulling the wires apart. Take a photo of the wire connections before you disconnect them so you can reconnect them the same way later. If you are not comfortable working with electrical wiring, stop here and call a licensed electrician.
Inspect the opening for damage. If the drywall is dented, torn, or water-damaged, cut out the damaged section with a utility knife and patch it with a drywall patch kit. Sand the patch smooth and prime it with drywall primer before you install the new cabinet. If the studs are soft, rotted, or moldy, the wall has a moisture problem that must be fixed before you install a new cabinet.
Preparing the Opening
Clean the opening with a damp cloth to remove dust and debris. Let it dry completely. If the opening is recessed, check that the sides are plumb (straight up and down) by holding a level against each side. If either side is out of plumb by more than a quarter inch, you will need to shim the new cabinet during installation — shims are thin wedges of wood that you tap behind the cabinet to make it sit straight.
Measure the opening one more time and compare it to the dimensions of your new cabinet. The cabinet should fit with a quarter-inch gap on each side. If the opening is wider than the cabinet, you will need trim pieces to fill the gap. If the opening is narrower than the cabinet, the cabinet will not fit and you will need to either find a smaller cabinet or have a contractor enlarge the opening.
If there are electrical outlets in the opening, you may need to relocate them or have an electrician move them before the new cabinet goes in. Check the depth of your new cabinet — if it is deeper than the old one, the outlets may be in the way. Plan this before you start installation.
Installing the New Cabinet
Position the new cabinet in the opening and check that it is level from side to side and plumb from top to bottom. Use a level on the top edge and on both sides. If the cabinet is not level, use shims to adjust it. Tap shims behind the cabinet at the top and bottom until the level shows the cabinet is straight. You may need shims on one or both sides depending on how far out of plumb the opening is.
Once the cabinet is level and plumb, mark the screw holes on the wall through the mounting holes in the cabinet. Remove the cabinet and drill pilot holes at the marks — pilot holes are small holes that guide the screw and prevent the wood from splitting. Use a drill bit that is slightly smaller than the screw diameter.
Reinstall the cabinet and drive the screws through the mounting holes into the pilot holes. Screw the cabinet to the wall studs, not to drywall alone. If the mounting holes do not line up with studs, drill new holes that do. Use the screws provided with the cabinet — they are sized to hold the weight. Do not use drywall anchors; they will not support the cabinet over time.
Sealing and Finishing
Once the cabinet is screwed in place, check that the door opens and closes smoothly and that the cabinet is still level. If the door binds or sticks, loosen the screws slightly, adjust the cabinet, and retighten. Do not force the door — a binding door means the cabinet is not sitting square in the opening.
Caulk the seams between the cabinet trim and the wall with paintable caulk. Run a bead of caulk along the top, bottom, and sides where the trim meets the wall. Smooth the caulk with a wet finger or a caulk tool. Caulk prevents moisture from seeping behind the cabinet and into the wall cavity, which can cause mold and rot. Let the caulk dry according to the manufacturer's instructions — usually 24 hours — before you paint.
If the cabinet trim does not match your wall color, paint the trim and the wall around it with bathroom paint. Use paint rated for high-moisture areas. Paint the caulk as well so it blends with the trim. Let the paint dry completely before you install shelves or hang the cabinet door.
Reconnecting Electrical Outlets
If there are outlets inside the cabinet opening, reconnect them now. Turn off the main breaker again before you touch any wires. Match the wire connections to the photo you took earlier — black (hot) wires go to the brass screw, white (neutral) wires go to the silver screw, and bare copper (ground) wires go to the green screw. Twist the wires together with wire nuts and tuck them into the outlet box. Screw the outlet back into the box and install the cover plate.
Turn the breaker back on and test the outlets with a voltage tester to confirm they are working. If an outlet does not work, turn the breaker off again and check the wire connections. If you are not confident in your electrical work, call a licensed electrician to finish this step.
Common Mistakes to Avoid
The most common mistake is installing the cabinet without checking that it is level and plumb. A cabinet that is not level will look crooked and the door will not close properly. Always use a level and check both directions before you drive the screws.
Another mistake is fastening the cabinet to drywall instead of studs. Drywall cannot support the weight of a full medicine cabinet over time — the cabinet will sag and the fasteners will pull through the drywall. Always locate the studs with a stud finder and drive screws into them.
A third mistake is skipping the caulk step. Moisture from the bathroom will seep behind the cabinet and into the wall cavity if the seams are not sealed. This leads to mold, rot, and water damage that costs far more to fix than the time it takes to caulk properly.
Frequently Asked Questions
Can I install a larger cabinet in the same opening?
Not without enlarging the opening. A cabinet that is wider than the opening will not fit, and forcing it in will damage the trim and the cabinet. If you want a larger cabinet, you will need to have a contractor cut the opening larger, which involves removing drywall and possibly moving studs or electrical wiring.
What if the old cabinet is glued to the wall?
Run a utility knife along the edges to cut through the adhesive, then use a pry bar to gently work the cabinet away from the wall. Work slowly and support the weight as you go — rushing will crack the drywall. If the adhesive is very strong, explore a heat gun to soften it before you pry.
Do I need to hire an electrician if there are outlets in the opening?
Only if you are not comfortable working with electrical wiring. If the outlets are already in the opening and you are just reconnecting them to a new cabinet, you can do it yourself — turn off the breaker, take a photo of the connections, disconnect the wires, and reconnect them the same way. If you need to move the outlets or add new ones, hire a licensed electrician.
How long does the caulk take to dry?
Most paintable caulk dries in 24 hours, but check the label on your caulk — some brands dry faster or slower. Do not paint over the caulk until it is fully dry, or the paint will not adhere properly and may peel.
What if the new cabinet is shallower than the old one?
You may have a gap behind the cabinet where the old cabinet was deeper. This is normal and does not affect function. You can leave the gap as is, or you can install a backing board to fill it and prevent moisture from entering the wall cavity.