Skip to content

Blog / WordPress

Why I build almost every WordPress project on Sage by Roots now

Ten years ago a WordPress theme meant a folder of PHP files, a growing functions.php, and whatever jQuery the last developer left behind. It shipped. It also became unmaintainable somewhere around month nine.

Sage changes the shape of the problem. You get Blade templates, Composer autoloading, view composers and a Vite build step, which means a WordPress project starts to look like the Laravel projects most of us already know how to maintain. Below is where that pays off, and the two cases where I still reach for a classic theme.

1. Templates stop repeating themselves

The single biggest win is Blade layouts and components. Instead of eight template files each re-declaring the same header markup, you extend a layout and fill in slots. When a client asks to change the breadcrumb, you change it once.

The test I apply to any stack: can a competent developer who has never seen this codebase ship a small change on day one?

2. View composers keep logic out of markup

Queries and formatting move into a composer class, so templates read as markup again. It also makes the data layer testable, which matters the moment a page pulls from more than one source.

app/View/Composers/Hero.php

class Hero extends Composer
{
  public function with(): array
  {
    return ['heading' => get_field('heading')];
  }
}

3. Tailwind and theme.json, one source of truth

Design tokens live in the Tailwind config and get mirrored into theme.json, so the block editor offers exactly the palette and type scale the front end uses. Editors stop producing pages that look off-brand, because the off-brand options aren’t there.

When I still build classic

  • Shared hosting with no Composer or Node available, and no appetite to move.
  • An in-house team that maintains PHP but has never used a build step. The wrong tool for their reality is still the wrong tool.

Everything else: Sage, every time. The build step costs an afternoon of setup and saves months of maintenance.

N

Nasim Noori

Freelance full-stack developer in Toronto, covering WordPress themes, JavaScript apps, technical SEO and Salesforce. Ten years, mostly cleaning up after page builders.

Work with me →

Got a project that needs doing properly?

Free 30-minute call, honest assessment, fixed price before anything starts.

Start a conversation