How to Build a Pergola: Step-by-Step DIY Guide
Building a pergola is one of the more achievable large-scale backyard projects for someone with basic construction skills. A simple freestanding pergola with four posts, two beams, and a set of rafters can be built in a weekend. Here's how to approach it.
Before You Start
- Check local codes and permits. Many municipalities require a permit for structures over a certain height or footprint. Attached pergolas almost always need a permit. See our permits guide.
- Call 811 (or your local utility locator) before digging post holes. Hitting a gas or electric line is dangerous and expensive.
- Choose your material. For a first-time DIY build, pressure-treated pine is the most forgiving and cheapest. Cedar looks better and resists rot naturally. See pergola materials compared.
Tools You'll Need
Circular saw (or miter saw), drill/driver, post hole digger or auger, level (4-foot minimum), speed square, tape measure, clamps, socket wrench set, string line, and a stepladder. A second pair of hands is essential for raising beams.
Step 1: Layout and Post Holes
Mark your pergola footprint using stakes and string lines. Make sure it's square by measuring diagonals — they should be equal. Dig post holes 12 inches in diameter and below your local frost line (typically 24-48 inches deep, depending on your climate zone). Place 4-6 inches of gravel in the bottom for drainage.
Step 2: Set the Posts
Set 6x6 posts in the holes and plumb them with a level on two adjacent sides. Brace each post with temporary 2x4 supports. Fill the holes with concrete mix (quick-set works well), keeping the concrete 2-3 inches below grade so you can cover it with soil or gravel. Let the concrete cure at least 24-48 hours before loading the posts.
Step 3: Cut Posts to Height
Use a string line and line level to mark all posts at the same height. Standard pergola height is 8-9 feet from ground to the top of the beam. Cut the posts with a circular saw (you'll need to cut from multiple sides on a 6x6) or a reciprocating saw.
Step 4: Install the Beams
Beams sit on top of the posts and run along the two longer sides of the pergola. For a typical 10-12 foot span, use doubled 2x8 or 2x10 beams with a decorative tail cut on the ends. Bolt the beams to the posts using 1/2-inch carriage bolts or structural screws. Let the beams overhang the outer posts by 12-18 inches on each end.
Step 5: Install the Rafters
Rafters run perpendicular to the beams across the top. Use 2x6 lumber, spaced 12-16 inches apart. Notch each rafter where it sits on the beam (a simple bird's-mouth cut) for a cleaner look and more stability, then fasten with structural screws. Add decorative tail cuts to the rafter ends if desired — curved, angled, or stepped cuts all work.
Step 6: Add Purlins (Optional)
Purlins are smaller boards (2x2 or 1x2) that run on top of the rafters perpendicular to them, creating the classic pergola lattice pattern. They add more shade coverage and visual interest. Screw them down from above.
Step 7: Finish
Sand any rough edges, especially on decorative cuts. Apply stain and/or sealant if using wood (even cedar benefits from UV-blocking stain). Consider adding lighting, a retractable canopy, or training climbing vines up the posts.