DIY Fence and Gate Installation

DIY Home Security: Installing a Gate

How to hang a simple manual gate yourself: setting hinge posts, building a braced frame, fitting hinges and a latch, and adjusting sag. Automatic operators excluded.

On this page
  1. Scope: a manual gate only
  2. Why gates fail
  3. Step 1: Plan the opening
  4. Step 2: Set strong posts
  5. Step 3: Build a stiff frame
  6. Step 4: Choose and fit hinges
  7. Step 5: Fit the latch
  8. Step 6: Adjust sag
  9. Finishing and security

Scope: a manual gate only

This article covers a simple swinging gate that you open by hand, such as a walk-through gate in a yard fence. It does not cover automatic operators, motors, wiring or sensors. Those involve electrical work and safety systems and are best left to a qualified professional, a point worth remembering if you plan to add an opener later. Leave room in your plan, but do not improvise one.

Also check local rules before you start: permits, height limits, and the property line. Have underground utilities marked before digging the gate post holes, as with any fence post.

Why gates fail

Gates are heavy, move often and hang from one side, so gravity and use pull the latch side down. Most sagging, dragging and misaligned latches trace back to a few causes: a weak hinge post, a frame that is not stiff, hardware that is too light, or a gap that was set without allowing for seasonal change. Build for these from the start.

Step 1: Plan the opening

Decide the gate width and the direction of swing. A walk-through gate is often around 3 to 4 feet wide, but your own needs set the number. Make sure the swing does not hit steps, plants or a slope. If the ground rises on the swing side, the gate may drag, so plan extra clearance or hang it to follow the rise. For more on sloping ground, see tips for installing a fence on uneven ground.

Plan clearances around the frame. A common approach is to leave a small gap at the latch side and under the gate. Hardware and manufacturers give specific numbers, so follow the instructions that come with yours. A gap that is too tight can bind when wood swells in humid weather.

Step 2: Set strong posts

The hinge post carries the load. It should be larger, deeper and better anchored than a standard line post. Many builders use a thicker post than the rest of the fence and set it with concrete, then give it time to cure fully before hanging the gate. For depth, follow local guidance on post depth, which is especially important in cold climates.

The latch post matters less for load but must be plumb, and it must stay in position. If the two posts lean toward or away from each other, the gate will never close neatly. Use a level on two sides of each post and measure the distance between them at the top and the bottom.

Step 3: Build a stiff frame

A gate frame that flexes will sag. A typical wood gate frame has top and bottom rails joined to two vertical stiles, fastened with exterior screws and often with metal corner brackets or glued joints where the material allows. A diagonal brace is the key element: it should run from the bottom hinge corner up to the top latch corner. In that direction the brace works in compression and resists the gate dropping at the latch end. Installing it the wrong way around gives much less benefit. More about gate bracing and anti-sag kits is available elsewhere.

Square the frame before you fasten the brace. A simple check is to measure both diagonals; if they are equal, the frame is square. Then add the face boards or infill.

Step 4: Choose and fit hinges

Pick hinges rated for the gate’s weight, with weather-resistant finishes. Options include strap hinges, T-hinges, and heavier-duty types; gate hinge types are worth reading about before buying. Fasten hinges with the screws or bolts recommended, and use through-bolts on heavy gates where recommended. In wet or coastal climates, consider corrosion-resistant hardware.

To hang the gate, support it on blocks or scrap wood at the correct height, with the planned gaps underneath, then mark and attach the hinges to the hinge post. A helper is almost essential, since holding a gate in place while fastening it is awkward alone.

Step 5: Fit the latch

A latch should close securely, be easy to operate on the intended side, and not depend on the gate being perfectly aligned. Common choices are thumb latches, gravity latches and magnetic ones; gate latch types are compared elsewhere. For gates near pools or play areas, a latch that is child-resistant and out of a small child’s reach may be required by local rules, so check pool fencing rules where you live. Position the latch and strike so the catch lands squarely when the gate closes. Adding a stop on the latch post, a strip of wood that the gate rests against, prevents it from swinging through.

Step 6: Adjust sag

After the gate has hung for some days, check it. If the latch end has dropped:

  • Check that the hinge post has not leaned. This is the most common cause.
  • Tighten the hinge screws or bolts.
  • Make sure the diagonal brace is tight and oriented correctly.
  • Add or adjust a turnbuckle and cable brace if your gate design uses one, tightening gradually.
  • Plane or trim any rubbing edge, then seal the bare wood.

Small seasonal changes are normal, since wood swells and shrinks. A gate that needs adjusting yearly is common.

Finishing and security

Seal or paint all surfaces, including edges and the bottom, to slow rot. A latch that can be locked, such as with a hasp for a padlock, adds a little more control. Home security advice here is general: a gate adds a visible barrier and a point of control, but no gate guarantees against intrusion.

The complete guide to diy fence and gate installation

DIY Home Security: Installing a Fence
Read the guide

Keep exploring

Guides from other topics

All topics →