If you’re redoing a backyard, it’s easy to think of the fence and landscaping as two separate projects.
They really aren’t.
A new fence affects where crews need access, where posts can go, how water moves, where irrigation lines run, how high the finished grade sits, and where gates actually make sense. Landscaping can affect all of those same things in return.
That’s why project order matters.
In most cases, you want the major site work finished first, then the fence, then the final landscaping.
The important exception is that “landscaping” can mean a lot of different things. Major grading and retaining walls usually need to happen before the fence. New sod, mulch, smaller plants, and decorative finishing usually make more sense after it.
TL;DR
For most backyard projects, the cleanest order is:
- Property layout and planning
- Major grading, drainage, and retaining work
- Hardscape that determines finished elevations
- Fence installation
- Irrigation adjustments
- Final planting, mulch, sod, and decorative landscaping
The goal is to avoid installing a fence around a yard that is about to change shape or installing expensive landscaping that has to be torn up so the fence crew can work.
Should You Install a Fence Before Landscaping?
Usually, yes, but only after the major ground work is complete.
If by landscaping you mean planting shrubs, installing sod, spreading mulch, adding decorative rock, or finishing flower beds, the fence should normally go in first.
If you’re talking about changing the grade, building a retaining wall, correcting drainage, or pouring a patio that changes the final elevation around the fence, those projects often need to happen before the fence.
That distinction matters because a fence is tied to the ground much more directly than people realize.
Posts are set at specific elevations. Gate clearances are planned around the finished surface. Panels are built around the slope of the property. Once all of that is installed, raising or lowering the surrounding soil can create problems that weren’t there originally.
For example, say a metal fence is installed with a few inches of clearance above the existing soil.
A month later, the landscaping crew adds several inches of soil and mulch along the entire fence line.
Now the bottom rail may be sitting directly against damp material that was never supposed to touch it. A gate that had comfortable clearance can also start rubbing if the finished grade is raised underneath its swing path.
The opposite can happen too.
If the yard is graded lower after the fence goes in, a small intentional gap can become a much larger opening underneath the panels.
The fence didn’t move. The yard did.
That’s why the best answer isn’t simply “fence first.”
It’s:
Finish anything that determines the shape and elevation of the property first. Install the fence next. Then finish the landscape around it.
What Should Be Done Before the Fence Goes In?
The work that changes grade, structure, or access should usually happen first.
A simple way to think about it is whether the project will change where the ground is, where water goes, or how the fence needs to be supported.
| Usually Before the Fence | Usually After the Fence |
|---|---|
| Major grading | Sod |
| Retaining walls | Mulch |
| Drainage corrections | Decorative rock |
| Large hardscape changes | Small shrubs and flowers |
| Driveway work affecting the gate area | Most finish planting |
| Property-line verification | Landscape finishing |
| Major tree or stump removal | Final irrigation adjustments |
That doesn’t mean every project follows the exact same order.
A large tree might stay in place while the fence is designed around it.
An irrigation main line may need to go in early, while the smaller drip lines are adjusted after the fence is installed.
A patio that sits nowhere near the fence line may not affect the sequence at all.
What matters is coordination.
If one contractor is changing something another contractor needs to build around, that change should usually happen first.
Why Can Landscaping First Create Problems?
The biggest problem is usually access.
Fence installation isn’t just someone carrying panels into the yard and setting them in place.
Posts have to be laid out and dug. Materials need to move through the property. Crews need room to work along the fence line. Depending on the project, there may be welding, concrete work, equipment, wheelbarrows, or repeated foot traffic through the same areas.
That can be rough on brand-new landscaping.
Imagine installing fresh sod across the backyard on Monday and having a fence crew crossing it repeatedly with materials on Wednesday.
Or planting a row of new shrubs exactly where the post holes need to be.
Or spreading decorative gravel throughout a side yard, only to realize the gate opening needs to be two feet wider than originally planned.
None of those are catastrophic mistakes. They’re just unnecessary.
New Plants Can Also Limit the Fence Layout
Landscaping can sometimes force compromises into a fence that wouldn’t otherwise be necessary.
Suppose a homeowner plants an expensive tree exactly where the cleanest fence line should run.
Now the options might be:
- Move the tree
- Move the fence
- Introduce an awkward jog in the fence line
- Place a post too close to the root system
- Redesign that entire section
If the fence layout had been planned first, the tree could have been positioned a few feet differently and both projects would have worked better.
Finished Landscaping Can Hide Important Conditions
It also helps to see the actual ground before everything is covered.
Fresh mulch can hide low spots.
Decorative rock can conceal where runoff is cutting through the soil.
A newly planted bed can make it harder to see exactly how the property slopes.
That matters because fence posts, panel heights, and gate clearances all respond to those conditions.
You generally want the fence designed around the real property, not around a temporary layer of landscaping that may change again later.
What About Sprinkler and Irrigation Lines?
Irrigation should be planned before the fence goes in, even if the final sprinkler heads and drip lines are installed afterward.
The main reason is simple: fence posts go into the ground, and irrigation lines do too.
If nobody knows where those lines are running, you can end up with a post location directly on top of a pipe, valve box, or main irrigation line. At that point, one contractor has to work around the other instead of both systems being designed properly from the start.
This comes up a lot in side yards, where everything gets squeezed into a relatively narrow space. You may have a fence line, gate, irrigation lines, drainage, utilities, and planting all trying to occupy the same few feet.
The best approach is usually to identify the main irrigation routes early, install or protect anything that truly needs to be in place first, and then make the final adjustments after the fence is installed.
That gives the fence crew room to set posts properly without forcing the landscaper to completely redesign the irrigation afterward.
Should Sprinklers Spray Directly Onto a Metal Fence?
Ideally, no.
Occasional rain is one thing. A sprinkler hitting the same section of metal every morning is repeated moisture exposure in one very specific area.
That becomes more important around:
- Post bases
- Welded joints
- Hinges
- Gate hardware
- Areas where the coating has been scratched or damaged
If you’re already redesigning the irrigation as part of a landscaping project, take the opportunity to aim sprinkler heads away from the fence rather than treating the fence like part of the lawn.
It is a small detail that can make maintenance easier later.
Does the Finished Ground Height Matter?
Yes. The fence should be designed around the final grade, not a temporary soil level that is about to change.
This is one of the easiest coordination problems to miss.
Imagine a fence is installed first and the bottom rail sits three inches above the dirt. That looks completely normal.
Then the landscaping crew comes in and adds two inches of topsoil followed by a thick layer of mulch.
Now parts of the fence may be almost buried.
The opposite is just as possible. If soil is removed after the fence has been installed, you can suddenly end up with a large opening underneath a section that originally had perfectly reasonable clearance.
This matters around gates even more.
A normal fence panel can tolerate some change underneath it. A gate has to physically move through that space.
If the landscaper raises the finished grade underneath a swing gate, the gate may begin scraping before it is even fully open.
Plan Around the Final Surface, Not Just Dirt
The finished surface might be:
- Lawn
- Concrete
- Pavers
- Gravel
- Mulch
- Decorative rock
- A raised planting bed
Those surfaces can all end up at different elevations even if the raw dirt looked level beforehand.
That is why the fence installer should know what the landscape plan actually calls for.
If pavers are going beneath a pedestrian gate, for example, the gate clearance should be based on the finished paver height rather than the soil that happens to be there on installation day.
That sounds obvious once you say it out loud, but it is exactly the kind of detail that gets missed when the fencing and landscaping are planned separately.
Should a Retaining Wall Go In Before the Fence?
In most cases, yes, if the retaining wall changes the grade or will support the fence.
A retaining wall is not just another decorative landscape feature. It can change the elevation of the property, alter drainage, and completely change how the fence needs to be installed.
Suppose one side of a yard is being raised three feet with a new retaining wall.
Installing the fence first would mean designing it around a grade that is about to disappear.
Once the wall is built, the fence height, post locations, and even the type of foundation may all need to change.
It makes much more sense to establish the retaining structure first and then design the fence around the finished condition.
Can a Fence Be Installed on Top of a Retaining Wall?
Yes, but that needs to be planned as part of the wall design.
A fence mounted on top of a wall creates different loads than landscaping sitting beside it. The wall and its footing need to be appropriate for however the fence posts will be anchored.
That becomes especially important with taller metal fences and gates, because wind loads and repeated gate movement can transfer force into the structure below.
Simply finishing the retaining wall and later deciding to drill posts into the top is not always the best approach.
If you already know a fence will sit on the wall, tell the wall contractor and fence contractor before either project begins.
That gives both sides a chance to coordinate post locations, reinforcement, wall caps, and final elevations instead of improvising after the concrete is finished.
How Close Can a Fence Be to Trees and Large Roots?
Close enough to work with the landscape, but not so close that the post installation unnecessarily damages major roots or creates a problem as the tree grows.
Trees are one of the biggest reasons a perfectly straight fence line sometimes isn’t actually the best fence line.
A mature tree can have major roots extending well beyond the trunk. Digging a deep post hole directly through one of those roots just to keep every panel perfectly straight may not be worth it.
On the other hand, shifting the fence a few inches or adjusting panel widths may solve the problem without changing how the finished fence looks.
This is where custom fencing gives you more flexibility.
A standard panel system may expect every post to land at an exact interval. Custom metal fencing can often accommodate small changes in spacing so the design responds to what is already on the property.
Don’t Forget That Trees Keep Growing
You also need to think several years ahead.
A fence installed almost against a young tree trunk may look fine today. As the trunk gets wider, the tree can eventually push into the fence or make that section difficult to maintain.
The same applies to large shrubs.
Plants that look small at installation can become wide enough to hold moisture and debris against the fence, hide early rust or damage, and make repainting or repairs much harder.
That doesn’t mean keeping landscaping far away from every fence.
It means leaving enough room for the mature size of the plant, not just what it looks like at the nursery.
A little extra planning at this stage is much easier than cutting apart a mature shrub or moving a fence panel five years later because both were given the same space.