Block themes have become the modern foundation for WordPress design. They let site owners edit headers, footers, templates and global styles visually in the Site Editor, and they unlock features such as style variations, patterns and the Font Library for every part of a site. If your site runs on a classic PHP theme that has served you well, you may be wondering how to bring it into this new model without starting from scratch. The good news is that you can convert a classic theme to a block theme gradually and safely. This guide walks you through planning the move, choosing between a hybrid or full conversion, mapping each classic feature to its block equivalent, and testing everything before launch.

Classic Themes, Hybrid Themes and Block Themes
Before you start, it helps to understand the three kinds of themes you will meet.
- Classic themes are built with PHP templates such as
header.php,single.phpandfooter.php. Styling usually lives instyle.css, and site owners customise the design through the Customizer, widgets and menus. - Hybrid themes are classic themes that adopt some block features, such as a
theme.jsonfile for settings and styles, block template parts or block-based templates for certain screens. - Block themes are built entirely from blocks. Templates are HTML files made of block markup, global settings and styles live in
theme.json, and the whole site is editable in the Site Editor.
A useful insight from the Learn WordPress lesson on converting classic themes is that you do not have to convert everything at once. Adding theme.json to a classic theme already bridges much of the gap, and you can stop at the hybrid stage if that suits your budget and goals.
Why Convert to a Block Theme?
- Visual editing for the whole site. Headers, footers, archive layouts and 404 pages can be edited in the Site Editor without touching code.
- One source of design truth.
theme.jsondefines colours, typography, spacing and layout once, and both the editor and front end follow it. - Better editor consistency. What authors see in the editor closely matches the published page.
- Performance benefits. Block themes load styles for the blocks used on each page, which can reduce unused CSS.
- Access to the latest features. Style variations, section styles, patterns, the Breadcrumbs block and new design tools are designed with block themes in mind.
Step 1: Audit Your Classic Theme
A good migration starts with a clear inventory. Spend time listing what your current theme does:
- Templates. Which PHP templates exist? Note special templates for custom post types, landing pages or archives.
- Customizer settings. Colours, fonts, logo, layout choices, header options and any custom panels.
- Widget areas. Sidebars and footer widget areas, plus the widgets used in each.
- Menus. Menu locations and the menus assigned to them.
- Functionality in functions.php. Custom post types, shortcodes, image sizes, enqueued scripts and filters.
- Plugin integrations. Templates or hooks for WooCommerce, page builders, forms or membership plugins.
This list becomes your migration checklist. As a rule of thumb, keep functionality (custom post types, business logic) in a plugin, and let the theme focus on presentation. That separation makes any theme change much easier in the future.
Step 2: Set Up a Safe Working Environment
Never convert a theme on a live site. Work on a staging site or locally. WordPress Playground and Studio are excellent for this: you can spin up a copy of your site, experiment freely and reset whenever you like. Use version control such as Git for the theme files, and take a full backup before you begin.
Step 3: Add theme.json (the Hybrid Stage)
Adding theme.json is the single most valuable first step. It moves your design tokens (colours, fonts, spacing) into a format the editor understands, and it works in classic themes too. A starting file might look like this:
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"settings": {
"appearanceTools": true,
"layout": {
"contentSize": "720px",
"wideSize": "1200px"
},
"color": {
"palette": [
{ "slug": "primary", "color": "#1e3a8a", "name": "Primary" },
{ "slug": "accent", "color": "#f97316", "name": "Accent" },
{ "slug": "base", "color": "#ffffff", "name": "Base" },
{ "slug": "contrast", "color": "#0f172a", "name": "Contrast" }
]
},
"typography": {
"fontSizes": [
{ "slug": "small", "size": "0.9rem", "name": "Small" },
{ "slug": "medium", "size": "1.125rem", "name": "Medium" },
{ "slug": "large", "size": "1.75rem", "name": "Large" }
]
}
},
"styles": {
"color": {
"background": "var(--wp--preset--color--base)",
"text": "var(--wp--preset--color--contrast)"
}
}
}
Take your existing brand colours and font sizes from style.css or the Customizer and express them as presets. WordPress generates CSS custom properties such as --wp--preset--color--primary, which you can gradually use in your existing CSS. At this stage your theme is a hybrid: the PHP templates still render the site, but the editor now shares the same design system.
Optional hybrid features
From here, you can adopt more block features one at a time:
- Block template parts. Classic themes can support block-based template parts with
add_theme_support( 'block-template-parts' );, which lets you build, for example, a footer in the editor. - Block templates for posts and pages. With
theme.jsonpresent (oradd_theme_support( 'block-templates' )), users can create and edit templates for posts and pages in the editor. - Patterns. Register reusable layouts by placing PHP files in a
/patternsfolder. WordPress registers them automatically.
Many teams run happily as a hybrid for a while, then complete the conversion when they are ready.

Step 4: Create the Block Theme Structure
A block theme needs very little to be recognised: a style.css file with the theme header and a templates/index.html file. A typical structure looks like this:
my-block-theme/
├── style.css
├── theme.json
├── functions.php
├── templates/
│ ├── index.html
│ ├── single.html
│ ├── page.html
│ ├── archive.html
│ ├── search.html
│ └── 404.html
├── parts/
│ ├── header.html
│ └── footer.html
├── patterns/
├── styles/
└── assets/
├── fonts/
└── images/
The template hierarchy works exactly as it does in classic themes. templates/single.html replaces single.php, templates/404.html replaces 404.php, and so on.
Mapping classic files to block theme files
| Classic theme | Block theme equivalent |
|---|---|
| header.php / footer.php | parts/header.html / parts/footer.html |
| index.php, single.php, page.php | templates/index.html, single.html, page.html |
| sidebar.php and widget areas | Template parts or patterns |
| Customizer colour and font settings | theme.json settings and Styles |
| wp_nav_menu() and menu locations | Navigation block |
| get_template_part() snippets | Patterns or template parts |
| functions.php features | functions.php (presentation only) or a plugin |
Step 5: Build Templates and Template Parts
The easiest way to create templates is to build them visually in the Site Editor and then save them to the theme’s files. The free Create Block Theme plugin is designed for this. It can create a blank theme, create a new theme based on the active theme, create a child theme, create style variations and export your theme, including changes made in the Site Editor.
A practical workflow looks like this:
- Install Create Block Theme on your staging site and create a new blank block theme.
- Activate it and open Appearance → Editor.
- Rebuild the header: add your Site Logo, Site Title and Navigation blocks inside a Group block, then match spacing and colours to your original design.
- Rebuild the footer and other template parts in the same way.
- Build each template: Single, Page, Archive, Search and 404, using blocks such as Post Title, Post Featured Image, Post Content, Query Loop and Pagination.
- Use Create Block Theme’s Save Changes to Theme option so your work is written to the theme’s HTML and JSON files.
Here is a simple single post template written in block markup, so you can see what the plugin produces:
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
<main class="wp-block-group">
<!-- wp:post-title {"level":1} /-->
<!-- wp:post-featured-image /-->
<!-- wp:post-content {"layout":{"type":"constrained"}} /-->
</main>
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
Step 6: Migrate Menus, Widgets and Customizer Settings
Menus
Block themes use the Navigation block instead of menu locations. When you add a Navigation block, it can import an existing classic menu, so your current links carry over. Review each menu after importing, and take the opportunity to simplify it if needed.
Widgets
Block themes do not use widget areas. Recreate sidebar and footer content with blocks inside template parts or patterns. Most common widgets have block equivalents: Latest Posts, Categories, Search, Tag Cloud, Social Icons and Custom HTML.
Customizer settings
In block themes, design settings move to Appearance → Editor → Styles, backed by theme.json. Logo and site title become the Site Logo and Site Title blocks. Additional CSS remains available in the Styles panel for small adjustments, though it is best to express as much as possible through theme.json presets.
Fonts
Register your fonts in theme.json or install them through the Font Library, and they will be available throughout the editor. See our WordPress Font Library guide for both approaches.
Step 7: Move Functionality Out of the Theme
Review your old functions.php. Anything that is not about presentation, such as custom post types, shortcodes, custom fields or integrations, belongs in a small site plugin. This keeps content available no matter which theme is active. In your new block theme, functions.php usually only needs to enqueue a small stylesheet, register block styles or pattern categories, and add any theme supports you want. If you are building custom blocks along the way, our guides to PHP-only blocks and the Block Bindings API show modern, lightweight approaches.
Step 8: Add Style Variations and Child Theme Support
Once the core templates are in place, block themes make it easy to offer design flexibility without extra code.
Style variations
A style variation is a JSON file in the /styles folder that overrides parts of theme.json, such as the colour palette or font choices. Site owners can switch between variations in Appearance → Editor → Styles. For example, you might provide a light variation, a dark variation and a high-contrast variation. Create Block Theme can save a variation directly from your current Styles settings, which is a quick way to build them.
Section styles
Section styles let you define a set of colours and element styles for a container block, such as a Group, and apply it with one click. They are ideal for alternating light and dark sections on a landing page while keeping text, links and buttons readable in each.
Child themes
If others will customise your new block theme, child themes work just as they do for classic themes. A child theme can override individual templates or parts and provide its own theme.json, which WordPress merges with the parent’s. Create Block Theme can also generate a child theme of the active theme for you.
Common Migration Challenges and Friendly Solutions
- Complex PHP logic in templates. Move logic into custom blocks, block bindings or PHP patterns so templates stay as clean block markup.
- Shortcodes inside templates. The Shortcode block can render existing shortcodes while you gradually replace them with blocks.
- Page builder layouts. Pages built with a builder usually keep working because their content is stored in the post, but test each one and check the builder’s block theme guidance.
- Design details that differ slightly. Small spacing or font differences are normal. Adjust
theme.jsonpresets first and use a small stylesheet only for the details that remain.
Step 9: Test Thoroughly Before Launch
Work through a careful checklist on staging:
- Every template. Home, blog index, single posts, pages, categories, tags, authors, search results, 404 and any custom post types.
- Responsive layouts. Check mobile, tablet and desktop. Block themes provide responsive controls in the editor, and our guide to responsive styling without CSS explains the newest options.
- Plugin output. Forms, sliders, WooCommerce pages and membership areas. WooCommerce has its own guide to migrating from classic to block themes with useful detail for stores.
- Performance. Run PageSpeed Insights on key templates and compare with the old theme, with special attention to CLS and LCP.
- Accessibility. Check heading order, keyboard navigation, focus styles and colour contrast using our WCAG 2.2 checklist.
- SEO. Confirm titles, meta descriptions, canonical URLs and structured data still output correctly. Our schema markup guide explains how to test structured data.
When everything looks right, take a fresh backup of the live site, deploy the new theme during a quiet period, and keep the old theme installed for a short time in case you need to compare anything.
Frequently Asked Questions
Will converting my theme affect my content?
No. Posts, pages and media are stored in the database independently of the theme. Converting changes how content is displayed, not the content itself. Shortcodes or features defined in the old theme are the exception, which is why moving functionality to a plugin first is so important.
Should I convert or build a new block theme from scratch?
For a small theme with a simple design, starting fresh with Create Block Theme and recreating the design is often quicker. For a large theme with many templates and integrations, a gradual hybrid approach spreads the work out and reduces risk.
Can I still use custom PHP in a block theme?
Yes. Block themes can include functions.php, and you can create dynamic output with patterns written in PHP or with custom blocks that render on the server.
Do page builders work with block themes?
Many page builders support block themes, especially for page content. Check your builder’s documentation for recommended settings before migrating.
Conclusion
Converting a classic theme to a block theme is a rewarding project that gives your site a modern, flexible foundation. Start with an audit, work on staging, and introduce theme.json first so your design system lives in one place. From there, you can adopt block template parts and patterns as a hybrid, or go all the way with templates built in the Site Editor and saved with Create Block Theme. Move business logic into a plugin, rebuild menus and widgets with blocks, and test every template carefully before launch. Taken step by step, the migration is very manageable, and the result is a site that is easier to edit, easier to maintain and ready for everything WordPress offers next.

Leave a Reply