How to Build a Wooden Baby Gate with a Sliding Lock Mechanism

AI-generated editorial illustration of garden trellis and screen
Updated Sep 27, 2026· 8 min read

As an Amazon Associate I earn from qualifying purchases. This post may contain affiliate links at no extra cost to you.

A wooden baby gate with a sliding lock is more reliable than most spring-loaded latches and easier to operate one-handed than a lift-and-swing hook. You can build one in a weekend with basic tools, and if you size it correctly, it will feel solid without rattling or sagging after a few months. This guide covers a wall-mounted, swing-open gate with a simple wooden slide bolt that locks into a receiver on the opposite wall or banister.

Contents
  1. Planning and Sizing
  2. Materials and Tools
  3. Choosing Wood and Hardware
  4. Building the Frame
  5. Making the Sliding Lock Mechanism
  6. Mounting and Alignment
  7. Safety Checks and What Goes Wrong

Planning and Sizing

Start with the opening, not the gate. Measure the width at the top and bottom — older houses can be off by 1/2 inch or more. Use the narrower measurement and subtract 2 inches total for clearance and hardware. For height, 36 inches is the standard. Anything under 30 inches is easy for a toddler to topple over, and over 38 inches becomes awkward to step over if you ever need to.

Decide on swing direction before you cut. The gate should swing away from the stairs if it is at the top of a staircase, never over them. For a hallway or doorway, swing it toward the side where you have a clear wall to mount the hinges. You need at least 1-3/4 inches of flat, solid wood for hinge screws. Drywall alone will not hold — you must hit a stud or add a mounting board that spans two studs.

For the frame, the outside dimensions should be your opening width minus 2 inches, by your chosen height. Inside that frame, vertical slats should be spaced no more than 2-3/8 inches apart. The CPSC limit is 3 inches, but tighter is better and prevents a head or torso from getting through. If you use 1×3 slats, you will need 7-9 slats for a typical 32 to 36-inch gate.

Materials and Tools

For a 34-inch wide gate, you will need about 14 linear feet of 1×4 hardwood for the frame, plus 18 linear feet of 1×3 for slats. Use straight, kiln-dried stock. Construction lumber (SPF 2x4s) is cheap but twists as it dries and will bind your sliding lock within weeks.

Hardware matters more than wood species here. Get two heavy-duty strap or T-hinges with at least 6 screw holes per leaf, a 6-inch slide bolt or the parts to make a wooden one, and 2-1/2 inch wood screws for wall mounting. You will also need wood glue, 1-1/4 inch brad nails or pocket screws, and sandpaper up to 180 grit.

Tool-wise, a miter saw or circular saw with a straight-edge guide, a drill/driver, a pocket hole jig kit or doweling jig, and a random orbit sander will cover 90% of the work. A router with a 1/4-inch straight bit makes a cleaner channel for the sliding lock, but a chisel and drill will work if you go slowly. For cutting the bolt channel accurately, a sharp wood chisel set is worth having.

Choosing Wood and Hardware

Not every hardwood makes sense for a gate. You want stability, dent resistance, and a non-toxic finish.

Material Pros Cons Best For
Poplar Cheap, stable, easy to mill, paints well Dents easily, bland grain if stained Painted gates on a budget
Hard Maple Very hard, holds screws well, resists wear Heavier, harder on tools, higher cost Natural or clear-coated gates that take daily abuse
Red Oak Strong, open grain hides scratches Can splinter if not sanded well, grain raises with water-based poly Stained gates where grain is part of the look
Baltic Birch Plywood (for lock block) Perfectly flat, no expansion Exposed edges need banding The sliding bolt housing itself

If you are painting, poplar is fine and saves 30-40% over maple. If you want a natural finish, hard maple is worth the upgrade — poplar will show every ding from toys and vacuum bumps within a month. Avoid pine for the moving parts. Its softness means the bolt channel will wear and the lock will develop slop after a few hundred cycles.

For the lock, you have two honest options. A metal slide bolt is cheapest and foolproof, but it rattles and a clever toddler can learn it in weeks. A wooden sliding bar (a 1×1 hardwood bar that slides through two keeper blocks) is quieter, can be made child-resistant by adding a lift-to-slide notch, and looks built-in. The wooden version takes an extra hour to make but is the better long-term choice for a gate you will use daily.

Building the Frame

Cut your top and bottom rails and two stiles to length. The classic, strong joint for a gate is a pocket-screw frame with glue, or a half-lap if you have a table saw or router. Butt joints with only brad nails will loosen — a gate gets racked every time it swings, and nails alone will work loose in under six months.

Dry-fit the rectangle on a flat surface and check for square by measuring diagonals. They should be within 1/16 inch of each other. If not, tap the frame until they match before you drive screws. Once square, glue and screw, then add your vertical slats. Fasten each slat with two screws or brad nails top and bottom plus a dab of glue. Keep spacing consistent with a 2-1/4 inch spacer block cut from scrap.

Sand everything to 180 grit and break all edges with a 1/8-inch roundover or just sandpaper. Sharp 90-degree edges dent little heads and chip finish. Apply two coats of water-based polyurethane or a hardwax oil rated for toys/cribs. Oil finishes are easier to touch up than film finishes. Let it cure fully — 24 hours for water-based poly — before mounting.

Making the Sliding Lock Mechanism

This is a lift-and-slide bar, not just a straight slide. The extra step is what makes it child-resistant.

Make the bolt from a 12-inch piece of 3/4 x 3/4 inch hard maple, sanded until it slides freely. Make two keeper blocks from 1-1/2 inch thick stock, each about 3 inches long. Drill a 3/4 x 3/4 inch square channel through both — drill and chisel to size, or rout it. The channel should be 1/32 inch oversize so the bar slides without binding, even in humid weather. If it is tight now, it will jam in August.

Mount one keeper block near the top rail on the latch side of the gate, and the second block 5 inches below it. The bar lives in both blocks and extends 2-1/2 to 3 inches past the gate edge when locked. On the receiver side (the wall or post), mount a U-shaped strike block with a 1-inch deep mortise to catch the bar. Line the mortise with a small piece of self-adhesive felt to eliminate rattle.

To create the child-resistant action, cut a 3/8-inch deep notch on the top of the bar and a matching pin (a short dowel or screw) in the upper keeper. The bar must be lifted 3/8 inch before it can slide. Toddlers lack the wrist coordination to lift and slide at once, but an adult can do it one-handed. Test it 50 times before you mount the gate. Common failure is a notch cut too shallow — then vibration alone can let the bar creep open. Cut a matching detent notch in the closed position so the bar drops and locks positively.

If you prefer metal hardware for speed, a 6-inch heavy-duty heavy duty sliding bolt latch mounted horizontally at adult hip height (about 36 inches) works. Add a spring clip behind it so it does not vibrate open. Either way, position the lock on the parent side of the gate, not the child side.

Mounting and Alignment

Mount a vertical 1×4 mounting board to the hinge-side wall first, screwing it into at least two studs with 2-1/2 inch screws. This spreads load and saves your trim. Hang the gate on the board with the hinges spaced 6 inches from top and bottom. Shim the gate so there is 1/8 inch gap at the hinge side and 1 inch clearance at the floor — enough to clear carpet but not enough for a foot to get under.

With the gate hanging plumb, mark the strike block location on the opposite side. The bar should enter the strike dead center without you having to push or lift the gate. If you have to force alignment, the gate will sag faster. Pre-drill everything. Hardwood splits instantly near ends.

Tighten hinges, then swing the gate 20-30 times and recheck. Wood gates settle. If you hear scraping, plane or sand 1/32 inch off the latch side rather than cranking hinge screws tighter, which pulls the mounting board out of plumb.

Safety Checks and What Goes Wrong

Before daily use, test with real force. Push the gate at mid-height with about 40 pounds of pressure — roughly what a leaning toddler applies. There should be no flex at the joints and no wall anchor movement. Pull up on the top rail; hinges should not lift. Check that the sliding bar cannot be opened by jiggling or by a straight pull without lifting.

Three failures show up repeatedly: First, screws into drywall anchors instead of studs — the gate rips out on the third or fourth lean. Second, slat spacing drifting over 3 inches because the spacer block was not used consistently. Third, a bolt channel cut too tight, which swells shut in summer humidity and tempts parents to leave the gate unlocked.

Inspect monthly. Tighten hinge screws, check the bar for wear, and look for cracks around the strike block. If you move the gate to a new opening, fill old screw holes and re-find studs — never reuse old holes for a safety gate. A painted poplar gate will need touch-up yearly at the latch area; maple will go longer without showing wear. Either is safe if built square, mounted to structure, and locked with a true lift-to-slide action.

W
Woodworking Projects
We compare specs, warranty terms, long-term owner feedback and street pricing before anything earns a spot. Rankings are never paid.
Affiliate disclosure. As an Amazon Associate we earn from qualifying purchases at no extra cost to you. Prices accurate as of the date shown.
How to Build a Wooden Baby Gate with…Check price on Amazon

Related guides

Browse all How-To guides →