For years the default way to build a small-business WordPress site was a page builder plugin. They're flexible, but they tend to ship a lot of CSS and JavaScript, wrap everything in nested divs, and lock your content into a format that's hard to move away from.
The block editor (Gutenberg) has quietly caught up. With a block theme, theme.json and patterns, you can build a site that a non-technical owner can edit safely, that loads quickly, and that doesn't depend on a third-party builder. Here's a practical setup.
1. Start with a block theme
A block theme is built from HTML templates made of blocks, edited in the Site Editor. The simplest start is a child theme of a default block theme like Twenty Twenty-Five, or a minimal starter theme.
The folder structure looks like this:
my-theme/ ├── style.css ├── theme.json ├── functions.php ├── templates/ │ ├── index.html │ ├── page.html │ └── single.html ├── parts/ │ ├── header.html │ └── footer.html ├── patterns/ │ └── hero.php └── styles/ └── dark.json templates hold full page layouts, parts hold reusable areas like the header and footer, patterns hold sections you insert into pages, and styles holds optional style variations.
2. Put your design decisions in theme.json
theme.json is where colours, fonts, spacing and layout widths live. Define them once and every block uses the same values, both in the editor and on the front end.
{ "$schema": "https://schemas.wp.org/trunk/theme.json", "version": 3, "settings": { "appearanceTools": true, "layout": { "contentSize": "720px", "wideSize": "1200px" }, "color": { "palette": [ { "slug": "brand", "name": "Brand", "color": "#1f4fd1" }, { "slug": "accent", "name": "Accent", "color": "#f5b301" }, { "slug": "ink", "name": "Ink", "color": "#111827" }, { "slug": "paper", "name": "Paper", "color": "#ffffff" } ] }, "typography": { "fluid": true, "fontSizes": [ { "slug": "small", "name": "Small", "size": "0.9rem" }, { "slug": "medium", "name": "Medium", "size": "1.125rem" }, { "slug": "large", "name": "Large", "size": "2rem", "fluid": { "min": "1.5rem", "max": "2.5rem" } } ] }, "spacing": { "units": ["px", "rem", "%"] } }, "styles": { "color": { "background": "var(--wp--preset--color--paper)", "text": "var(--wp--preset--color--ink)" }, "elements": { "link": { "color": { "text": "var(--wp--preset--color--brand)" } } } } } Two things worth knowing:
- Every preset becomes a CSS custom property, like
--wp--preset--color--brand, so any custom CSS you do write can use the same values. - With
fluidtypography, WordPress generatesclamp()values for you, so headings scale between screen sizes without media queries.
If the owner wants to change the brand colour later, they can do it in Appearance → Editor → Styles without touching code.
3. Build sections as patterns
Most small-business pages are made of the same few sections: a hero, a list of services, testimonials, a call to action. Build each one as a pattern, and pages become a matter of stacking patterns and changing the words.
Any PHP file in the theme's patterns folder with a header comment is registered automatically:
<?php /** * Title: Hero with call to action * Slug: my-theme/hero * Categories: banner * Keywords: hero, header, intro */ ?> <!-- wp:group {"align":"full","backgroundColor":"brand","textColor":"paper","layout":{"type":"constrained"}} --> <div class="wp-block-group alignfull has-paper-color has-brand-background-color has-text-color has-background"> <!-- wp:heading {"level":1,"fontSize":"large"} --> <h1 class="wp-block-heading has-large-font-size">A clear promise in one line</h1> <!-- /wp:heading --> <!-- wp:paragraph --> <p>One or two sentences that say who you help and how.</p> <!-- /wp:paragraph --> <!-- wp:buttons --> <div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"accent","textColor":"ink"} --> <div class="wp-block-button"><a class="wp-block-button__link has-ink-color has-accent-background-color has-text-color has-background wp-element-button">Get in touch</a></div> <!-- /wp:button --></div> <!-- /wp:buttons --> </div> <!-- /wp:group --> The easiest way to get the markup is to build the section in the editor, open the block's options menu, choose Copy, and paste it into the file.
For things that must be identical everywhere, like a contact strip or opening hours, use a synced pattern instead. Edit it once and every page updates.
4. Stop editors from breaking the layout
The biggest risk with handing a site to a business owner is a stray drag that wrecks a section. Two tools help.
Content-only locking. Add "templateLock":"contentOnly" to a Group block and editors can change text and images inside it but can't move, delete or restyle the blocks:
<!-- wp:group {"templateLock":"contentOnly","layout":{"type":"constrained"}} --> Limit the block inserter. Most sites don't need every block. A short filter keeps the list to what you've designed for:
add_filter( 'allowed_block_types_all', function ( $allowed, $context ) { return array( 'core/paragraph', 'core/heading', 'core/list', 'core/list-item', 'core/image', 'core/buttons', 'core/button', 'core/group', 'core/columns', 'core/column', 'core/quote', 'core/pattern', 'core/block', ); }, 10, 2 ); Include core/block so synced patterns still work, and core/pattern so pattern blocks in templates keep rendering.
5. Use block styles instead of custom classes
When you need a variation, say an outlined pill button, register it as a block style. It shows up as a clickable option in the editor, so nobody has to remember a class name.
add_action( 'init', function () { register_block_style( 'core/button', array( 'name' => 'pill-outline', 'label' => __( 'Pill outline', 'my-theme' ), 'inline_style' => '.wp-block-button.is-style-pill-outline .wp-block-button__link { border-radius: 999px; background: transparent; border: 2px solid currentColor; }', ) ); } ); 6. Performance you get for free, and what to check
A block theme starts from a good place:
- WordPress only loads the CSS for blocks that are actually on the page.
- Images get
loading="lazy"automatically, and WordPress tries to mark the main above-the-fold image withfetchpriority="high". - There's no builder framework loading on every page.
What's still on you:
- Image sizes. Upload images close to the size they're displayed at and in a modern format like WebP.
- Fonts. Host them locally (the Font Library in the Site Editor makes this easy) and load only the weights you use.
- Plugins. Every slider, popup and analytics plugin adds weight. Check each one earns its place.
- Measure. Run the important pages through PageSpeed Insights on mobile, not just desktop.
7. When a page builder still makes sense
The block editor isn't the answer to everything. If a site needs complex animations, heavy conditional logic, or the owner already knows a builder well and has no developer, a builder can still be the pragmatic choice. But for a typical small-business site (a homepage, service pages, an about page, a contact form and a blog) blocks now cover it, and the site will be lighter and easier to maintain for years.
Written by the team at NextStepAcademy, an Australian tutoring company.