All posts
Web design & development

Keeping a Next.js Marketing Site Healthy: Dependency and Framework Updates

Next.js maintenance for marketing sites: how to update Next.js, React and npm dependencies safely, how often to upgrade, and what upkeep code costs vs no-code.

By Mehdi Hassan8 min read

The short answer

Next.js maintenance means keeping a marketing site's framework, React, Node.js and npm dependencies current, then testing each update before it ships. Apply patch and minor updates monthly through automated pull requests, verify them on a preview deployment, act on security advisories within days, and plan major Next.js upgrades with the official codemods rather than letting versions fall a year behind.

Key takeaways

  • Small monthly updates are cheap; a year of skipped updates turns into a multi-day upgrade project.
  • Automate update pull requests, but have a person review, build and click through each one on a preview.
  • Treat framework security advisories as same-week work; both Next.js and React shipped urgent fixes in 2025.
  • Pin your Node.js version and move to a supported release before the old one reaches end of life.
  • Code gives you control and portability; the price is upkeep that hosted builders do for you.

Part of Website Maintenance: What It Includes and Why Startups Skip It at Their Peril

What does Next.js maintenance involve?

Next.js maintenance involves keeping four layers current: Next.js itself, React, the Node.js runtime and the npm packages your site depends on. Each releases fixes on its own schedule. Maintenance is the routine of applying those updates, testing them and shipping them without breaking the live site.

It's the part of owning a code-based site that hosted builders hide. On Framer or Webflow, the platform updates its own stack. On Next.js, your team or your developer does. That's not a reason to avoid Next.js, which we build most custom sites on, but it's a cost to plan for. For how this fits with the rest of upkeep, see our guide to website maintenance.

Layer

What changes

Suggested rhythm

npm dependencies

Patches, minors and occasional majors

Monthly, via automated pull requests

Next.js

Patches often; major versions periodically

Patches monthly; majors planned

React

Usually tied to Next.js majors

With Next.js upgrades

Node.js

LTS releases with published end-of-life dates

Before the current version's end of life

Security advisories

Unscheduled

Within days of disclosure

How often should you update Next.js?

You should apply Next.js patch and minor releases about monthly, and security fixes as soon as they're announced. Major versions can wait a little while the ecosystem catches up, but plan to adopt each one within a few months rather than skipping several. Staying one major behind is manageable. Staying three behind is a rebuild.

The reason is compounding change. Each major Next.js release can change defaults, deprecate APIs and require newer React or Node.js versions. Upgrading one step at a time means reading one set of release notes and running one set of codemods. Jumping several at once means untangling them all together, often alongside dependencies that dropped support for the old versions.

How do you update Next.js and npm dependencies safely?

You update safely by making every update a small, reviewable change that's built and tested before it merges. Automation opens the pull requests, the build and tests catch obvious breakage, and a preview deployment lets a person confirm the site still looks and works right.

  1. Automate update pull requests

    Use Dependabot or Renovate to open pull requests for outdated packages. Group minor and patch updates into one weekly or monthly batch to reduce noise.

  2. Keep the lockfile committed

    The lockfile pins exact versions, so the build that passed review is the build that ships. Never delete it to fix an install error.

  3. Build and type-check in CI

    Every pull request runs a production build, type-check and lint. Most breaking changes show up here.

  4. Check the preview

    Open the preview deployment and click through key templates: home, pricing, a blog post, a form. Submit a test form.

  5. Read release notes for majors

    For major versions of Next.js or React, read the upgrade guide and run the official codemods before fixing the rest by hand.

  6. Merge and watch

    Merge during working hours, then check error logs and Core Web Vitals over the following days.

The official Next.js documentation includes upgrade guides for each major version, and the Next.js codemod tool automates many of the mechanical changes. Preview deployments make step four painless, and Vercel, Netlify and Cloudflare all create them automatically for each pull request.

Handling npm audit warnings without panic

npm audit often reports many vulnerabilities, and most are in development tools that never ship to visitors, or in code paths a marketing site doesn't use. Don't run a forced fix blindly: it can jump packages across major versions and break the build.

Instead, check whether each advisory affects production code, whether a patched version exists and whether your site actually uses the vulnerable feature. Fix the ones that ship to the browser or run on the server first. Advisories for Next.js or React themselves should always be treated as urgent.

How should you handle Next.js security updates?

Handle Next.js security updates as same-week work: read the advisory, check whether your version and setup are affected, patch, test on a preview and ship. Framework vulnerabilities are rare but serious, and once they're public, automated scanning for unpatched sites starts quickly.

2025 showed why this matters. Next.js shipped a fix for a middleware authorization bypass in the spring, and late in the year a critical vulnerability in React Server Components required patches across frameworks that use them, including Next.js. Teams with a monthly update routine applied the fixes in an afternoon. Teams several majors behind had to upgrade first, sometimes under real time pressure.

Hosting can add a layer of protection. Platforms like Vercel and Cloudflare sometimes deploy mitigations at the edge for widely exploited issues, but treat that as a bonus, not a plan. Patch your own code. For the non-code side of security, such as access, two-factor login and form spam, see website security basics.

What else needs maintaining on a Next.js marketing site?

Beyond dependencies, a Next.js marketing site needs its rendering, performance, CMS integration and hosting setup kept healthy. These drift as content and features are added, and they're where most real-world problems on code-based sites come from.

  • Rendering: marketing pages should stay statically generated or cached, so search and AI crawlers get full HTML. Our guide to server-side rendering for AI crawlers explains why.
  • Performance: Core Web Vitals field data for Q2 2026 shows only about two-thirds of Next.js sites pass INP, with a median around 236ms. Third-party scripts and heavy client components are usual causes.
  • Design system: components and tokens need tending as pages are added, or the site fragments. See building a design system for a Next.js marketing site.
  • Styling stack: Tailwind and similar tools have their own major versions; our Next.js and Tailwind v4 setup covers the current approach.
  • Hosting adapters: if you run on Cloudflare, the adapter that runs Next.js there also needs updating. See hosting Next.js on Cloudflare Workers.

How much upkeep does Next.js need compared with no-code?

Next.js needs more technical upkeep than Framer or Webflow, because your team owns the code and its dependencies. In return, you get full control, no platform lock-in and the ability to build anything. Whether that trade is worth it depends on how much the site needs to do and who's available to maintain it.

Next.js

Framer or Webflow

Framework and security updates

Your team or developer

The platform

Custom features and integrations

No limits

Within platform limits

Portability

Full: host anywhere

Tied to the platform

Who can edit content

Editors in a headless CMS

Editors in the visual builder

Typical upkeep

A few hours a month, plus planned upgrades

Mostly content, forms and speed checks

If upkeep is the deciding factor, our guide to choosing a platform for your marketing site compares all four main options. Some teams move the other way, from code to a visual builder, when nobody can maintain the code; moving from Next.js to Framer or Webflow covers when that makes sense.

Who should maintain a Next.js marketing site?

A Next.js marketing site should be maintained by someone comfortable reading release notes, running builds and debugging when an update breaks something. That can be an in-house engineer, a freelance developer or a studio on retainer. What matters is that it's a named person with time set aside, not whoever on the product team has a spare afternoon.

Product engineers can maintain the marketing site, but it often loses to product work in prioritization, and updates slide. That's the most common reason we see marketing sites fall behind. If that's your situation, compare the options in who updates your website after launch, and see what each typically costs in our website maintenance cost guide.

Frequently asked questions

Is Next.js hard to maintain for a marketing site?
Not if updates are routine. A well-built Next.js marketing site with automated update pull requests and preview deployments needs a few hours a month, plus planned time for major upgrades. It becomes hard when it's left untouched for a year or more, or built with many custom dependencies that each need watching. Keeping the dependency list short helps a lot.
Do I need to upgrade to every new major version of Next.js?
Not immediately, but you shouldn't skip several. Security fixes and support usually focus on recent versions, and packages gradually drop support for old ones. A sensible approach is to adopt each major within a few months of release, once the upgrade guide and ecosystem settle, upgrading one major at a time with the official codemods.
What is the difference between Dependabot and Renovate?
Both open pull requests to update your dependencies automatically. Dependabot is built into GitHub and is simple to turn on. Renovate is more configurable, with stronger grouping, scheduling and auto-merge rules, which helps reduce noise on larger projects. Either works well for a marketing site; what matters is that someone reviews and merges the pull requests regularly.
Can I auto-merge dependency updates on my Next.js site?
You can auto-merge low-risk updates, such as patch releases of development tools, if your build and tests are reliable. Keep a human review for Next.js, React, CMS libraries and anything that affects rendering or forms, and always check those on a preview deployment. Auto-merging everything saves minutes and occasionally ships a broken page to every visitor.
What happens if I never update my Next.js site?
The site keeps working until something forces a change: a security vulnerability that only gets patched in newer versions, a host dropping an old Node.js version, or a needed package requiring newer React. At that point, a small fix turns into a large upgrade across several major versions. It's cheaper to update a little every month.

· CEO & Design Director

Copywriter, designer and developer, and founder of Designify Studio. Over five years, 60+ projects across 14+ industries, for startups that have raised $300M+.

Want this done for you? Monthly retainer, $6,000.

Your ongoing design and development team, for products that keep shipping. $6,000, per month, flat fee. Book a free 30-minute call to see if it fits.

Schedule Call