
Affiliate Disclosure
Some links on this page are affiliate links. As an Amazon Associate, we earn from qualifying purchases — at no extra cost to you. We do not buy, test, or physically handle the products we cover; our rankings come from aggregated owner reviews, ratings and expert consensus. Commissions never change our verdicts. How we rank · full disclosure.
Building a pergola is an intermediate DIY project: a kit goes up in a weekend with two people, while a from-scratch lumber build takes two weekends including footing cure time. Costs run $500 to $3,000 depending on size and material. The important first step is not carpentry — it is checking whether your city requires a permit and what the setback rules are, because pergolas frequently need one. Attached pergolas and larger structures are more likely to need a permit and an inspection, and getting a beam size or footing depth wrong is a structural problem.
Before you build: permits and layout
Check with your building department about permits, setbacks and footing depth (the local frost line), and clear it with your HOA. Call 811 before digging footings to mark utilities. Lay out the footprint with stakes and string, and confirm it is square by measuring the diagonals — equal diagonals mean square corners.

Step-by-step build (freestanding)
- Mark and dig footings. Locate the four post holes at your squared corners. Dig each below the frost line, roughly a foot wide, using a post-hole digger or auger.
- Set post bases or posts in concrete. Either pour concrete and embed adjustable post bases (cleaner and rot-resistant), or set the pressure-treated posts directly and brace them plumb. Let concrete cure per the label before loading.
- Plumb and brace the posts. Stand the 6x6 posts, check each for plumb in both directions with a level, and brace them with temporary supports until the beams tie them together.
- Cut posts to height. Mark a level line across all posts (a water level or laser helps) and cut them to a uniform height so the frame sits flat.
- Install the support beams. Fasten the 2x8/2x10 beams to the posts on both sides with carriage bolts or the kit hardware, sandwiching or notching per your design. Recheck square as you go.
- Add the rafters. Space the 2x6 rafters evenly across the beams (commonly 12 to 16 inches apart), notching or using rafter clips, and fasten each. Overhang the ends equally for the classic look.
- Add top slats or shade. Lay the top purlins or slats across the rafters for partial shade, spacing them for the light you want.
- Finish. Remove braces once the frame is self-supporting, then seal, stain or paint the lumber to protect it.

Tools and materials
You need a post-hole digger or auger, a drill/driver, a circular saw, a 4-foot level, a socket set for carriage bolts, clamps, and a tape measure. Materials are posts, beams, rafters, post bases, concrete, and exterior fasteners — or a complete pergola kit. A pergola defines an outdoor room, so build it over a solid surface using our paver patio guide, add privacy with our privacy screen guide, and string it with lights via our outdoor string lights guide. Furnish underneath from our patio furniture picks.

Mistakes that lead to a leaning pergola
- Footings above the frost line. They heave in winter and rack the frame. Dig to local frost depth.
- Not squaring the layout. Unequal diagonals mean a parallelogram, not a rectangle. Measure diagonals before digging.
- Undersized beams. A beam too small for the span sags over time. Size to the span with a table or code guidance.
- Loading uncured concrete. Beams on green concrete shift posts. Let footings cure first.
When a permit and a pro are needed
Permits and setbacks are jurisdiction-specific and pergolas frequently require them, especially attached ones — verify with your building department before you start. Hire a pro or a structural check for large spans, attaching a pergola to the house (which involves a ledger and flashing to keep water out of the wall), building on a deck that must carry the added wind load, or any design where you are unsure the beams and footings are sized correctly. Wind uplift on a pergola is real, so structure and anchoring are not the place to guess.
We never buy, test or physically handle the products we rank. Recommendations come from aggregated owner reviews, star ratings, review volume and expert consensus — see how we rank.
More from this hub: Outdoor Living & Grills · Building a paver patio · Hanging string lights · Building a privacy screen · Best patio furniture · How we rank