The honest TL;DR

Pick custom code if your site rarely changes and you care about speed, SEO, and keeping monthly costs near zero. If non-technical people need to publish content regularly, a custom site with Sanity Studio gives you easy editing without WordPress's overhead. Pick WordPress if your team already knows it or you specifically need WooCommerce. The wrong choice for your situation will cost you either way.

Disclosure: WebSilm mostly builds custom sites with Sanity Studio for content management. About a fifth of our projects are WordPress (mostly inherited sites, or cases where a client actually needs WooCommerce). We prefer Sanity because it gives clients the editing freedom of WordPress without the security and maintenance overhead. What follows is the same framework we use internally when a small business asks us which way to go.

When WordPress wins

WordPress makes sense when any of the following apply:

When custom code wins

Custom code makes more sense when:

5-year total cost: the table everyone wants but few publish honestly

These are real ranges from WebSilm projects, combined with public WordPress hosting and plugin pricing. Your numbers will be different, but the proportions hold.

Cost item Custom code (WebSilm) WordPress (typical agency)
Year-1 build €500 – €2,500 €1,500 – €4,000
Hosting (year 1) €0 – €60 (Cloudflare Pages free tier) €80 – €240 (Kinsta, WP Engine, SiteGround)
Premium plugins (year 1) €0 (none needed) €100 – €400 (Yoast Premium, WP Rocket, security, backup)
Maintenance (years 2–5) €0 – €240 total (occasional fixes) €400 – €1,600 total (€100–400/yr update + security)
Hosting + plugins (years 2–5) €0 – €240 total €720 – €2,560 total
5-year total €500 – €3,040 €2,800 – €8,800

Adding Sanity Studio to a custom build costs a fraction of what WordPress charges in hosting and plugins over five years. The CMS layer adds a bit to the initial build and nothing to hosting, so you still get easy editing and the site stays fast. The gap grows even wider for simple marketing sites that change once or twice a year.

Performance: what real measurements show

HTTP Archive's Web Almanac measures Core Web Vitals across millions of sites every year. The 2025 report (latest at time of writing):

Metric Custom static (avg) WordPress (avg)
Largest Contentful Paint (LCP) 0.8 – 1.4s 2.4 – 3.8s
Cumulative Layout Shift (CLS) 0.02 – 0.06 0.08 – 0.18
Interaction to Next Paint (INP) 80 – 150ms 180 – 380ms
% of mobile sites passing all 3 thresholds 78 – 84% 22 – 30%

This isn't really WordPress's fault. It's what happens to the average WordPress install over time: 2–3 themes sitting around (one active), 15–25 plugins each loading their own CSS and JS, an admin bar, render-blocking jQuery, heavy image sliders. You can tune a WordPress site to pass Core Web Vitals, but it takes ongoing work that most small business owners can't realistically do themselves.

Three real scenarios

Scenario 1: SaaS marketing site, 8 pages, content updates twice a year

Custom code wins. The whole point of the site is converting visitors. Speed and SEO are the product. Content changes maybe twice a year, so a developer retainer is cheaper than running a CMS. WordPress here would mean constant fighting with the platform to hit load times that actually matter for conversions.

Scenario 2: Restaurant with weekly menu and event updates

A CMS-backed custom build wins — and WordPress is an alternative. The owner publishes every week. That's a real need and it shouldn't be ignored. But 'needs a CMS' doesn't automatically mean 'needs WordPress.' Sanity Studio is just as easy to use as WordPress's editor, often easier, because there's no 15 years of accumulated buttons and plugin noise. You get a clean editing interface and a fast site. There's no admin panel to secure. WordPress is a reasonable choice here if the client already knows it and wants to manage everything without a developer going forward. But it's not the only choice.

Scenario 3: Local plumber / electrician / tradesperson

Custom code wins. 3–5 pages: services, service area, contact form, reviews. Barely ever changes. People land on the site, read enough to trust the business, and call or fill out the form. Pay €600 once, host for free, never think about it again. WordPress is overkill here.

The decision framework

Three honest questions to ask yourself
  1. Will someone who isn't a developer publish content more than twice a month? If yes → custom code with Sanity (easy editing, fast site) or WordPress (if the client already knows it). If no → custom code without a CMS, simple and cheap.
  2. Does page speed affect how many people buy from you? If yes (B2B SaaS, e-commerce, landing pages), custom code is usually worth it. If not really (local services, informational sites), either works.
  3. Do you need WooCommerce, LearnDash, or another big WordPress plugin? If yes → WordPress. Those plugins exist for a reason and the alternatives cost more to build.

What to ask any agency before they sell you either

One thing that often gets left out of this comparison: 'custom code' doesn't mean 'no content management.' For WebSilm projects where clients want to edit their own text, we use Sanity Studio — a visual editor that runs in the browser and requires nothing technical. The client sees exactly what they're changing. There are no plugins to update and no WP-admin password to remember. That's the path that often goes unmentioned in the WordPress vs. custom code debate.

Bottom line

For most of the small businesses we work with, custom code with Sanity wins over 5 years. Clients can edit their own content the way they would in WordPress, but the site loads faster and costs almost nothing to host on Cloudflare Pages. WordPress is still the right answer for teams that already know it, need WooCommerce, or manage hundreds of articles with multi-author workflows. The questions above should get you most of the way to a decision.

If you can't decide, we do a free 30-minute call where we'll tell you honestly which way to go. Sometimes that means telling you not to hire us. We won't pitch you and we won't send follow-up emails.