Skip to content
Black Friday 50% off + 15,000 credits Ends Nov 30 Ends Nov 30 see the deal
Black Friday15,000 free credits + 50% offends Nov 30

How to Create a WordPress Child Theme (Classic and Block Themes)

A child theme lets you change a theme without editing its files, so your changes survive the next theme update. It takes one folder and one file to start. Here is how to make one for a classic or a block theme, by hand or with a plugin, and when you don't need one at all.

In this article
  1. 01The short answer
  2. 02Do you need a child theme?
  3. 031. Create the child theme folder
  4. 042. Add style.css
  5. 053. Classic themes: load the stylesheets
  6. 064. Block themes: add theme.json
  7. 075. Install and activate it
  8. 086. Make your changes
  9. 09Or let a plugin do it
  10. 10Where WPOS fits
Key takeaways
  • A child theme keeps your changes when the parent theme updates.
  • It needs one file, style.css, whose Template line matches the parent's folder name exactly.
  • Classic themes usually need a functions.php that loads the stylesheets; block themes mostly use theme.json.
  • Files with the same name replace the parent's templates; functions.php adds to the parent's instead.
  • On a block theme, the Create Block Theme plugin makes a child theme from the Site Editor.
  • Site Editor changes don't need a child theme: they're saved in the database.

The short answer

Create a folder in wp-content/themes, add a style.css whose Template: line names the parent theme’s folder, then activate it under Appearance → Themes. In order:

  1. Find the parent theme’s folder name, for example twentytwentyfive.
  2. Create a folder for the child, such as twentytwentyfive-child.
  3. Add style.css with a Theme Name and the Template line.
  4. Classic theme: add a functions.php that loads the stylesheets. Block theme: add a theme.json for your style changes.
  5. Zip the folder, upload it under Appearance → Themes → Add New Theme, and activate it.
  6. Add your changes to the child’s files, never the parent’s.

On a block theme, the free Create Block Theme plugin, made by WordPress.org, does the same from the Site Editor in a few clicks. The steps follow WordPress’s Theme Handbook, checked on 9 November 2026.

Do you need a child theme?

You need one when you want to change the theme’s own files:

  • edit a template, template part or pattern;
  • add PHP code tied to the theme, such as a new template tag or a custom image size;
  • change the theme’s theme.json settings in a way you can copy to other sites.

You don’t need one for:

  • Colors, fonts and layout in a block theme. Changes made in the Site Editor are saved in the database, above both parent and child, and theme updates don’t touch them.
  • A few lines of CSS. Use Additional CSS: in the Customizer on classic themes, or under Styles in the Site Editor on block themes.
  • Features that aren’t about the design, such as a custom post type or a tracking script. Put those in a plugin or a code snippet, so they keep working if you ever change themes.

Editing the parent theme’s files directly is the one thing to avoid: the next update overwrites them.

1. Create the child theme folder

Go to wp-content/themes with your host’s file manager, SFTP or a local copy of the site, and note the exact folder name of the theme you want to extend. Create a new folder next to it. Any name works, but the parent’s name plus -child makes it obvious:

wp-content/themes/
├── twentytwentyfive/          ← the parent theme
└── twentytwentyfive-child/    ← your child theme

2. Add style.css

style.css is the one file a child theme must have. Its header tells WordPress the theme’s name and which theme is its parent:

/*
 Theme Name:   Twenty Twenty-Five Child
 Template:     twentytwentyfive
 Description:  Our changes to Twenty Twenty-Five.
 Version:      1.0.0
 Text Domain:  twentytwentyfive-child
*/

The Template value must match the parent’s folder name exactly, letter for letter. It’s the folder name, not the theme’s display name. Any CSS you write below the header goes in this file too.

3. Classic themes: load the stylesheets

Block themes can usually skip this step, because their styles come from theme.json. On a classic theme, whether your child needs code depends on what the parent loads, so look at the parent’s functions.php for wp_enqueue_style:

  • The parent loads both stylesheets: do nothing.
  • The parent loads only its own stylesheet, or none: load the child’s.
  • The parent loads only the active theme’s stylesheet (get_stylesheet_uri()): that’s now the child’s, so load the parent’s yourself.

Create functions.php in the child folder. To load the child’s stylesheet:

<?php
add_action( 'wp_enqueue_scripts', function () {
	wp_enqueue_style( 'child-style', get_stylesheet_uri() );
} );

To load the parent’s instead:

<?php
add_action( 'wp_enqueue_scripts', function () {
	wp_enqueue_style( 'parent-style', get_parent_theme_file_uri( 'style.css' ) );
} );

4. Block themes: add theme.json

A theme.json in the child is merged with the parent’s, so it only needs the settings you change. For example, to change the link color across the site:

{
	"$schema": "https://schemas.wp.org/trunk/theme.json",
	"version": 3,
	"styles": {
		"elements": {
			"link": { "color": { "text": "#0b5cff" } }
		}
	}
}

Templates, template parts and patterns work the same way: put a file with the same name in the child’s templates, parts or patterns folder and it replaces the parent’s. A pattern also needs the same slug.

One catch: changes you already made in the Site Editor belong to the parent theme. Create Block Theme’s Create Child Theme option carries your current changes into the new child, which is the easiest way to keep them.

5. Install and activate it

  1. If you made the folder on your computer, zip it and upload it under Appearance → Themes → Add New Theme → Upload Theme. If you made it on the server, it’s already there.
  2. Go to Appearance → Themes and click Activate on the child theme. Keep the parent installed, because the child depends on it.
  3. Check your key pages. The site should look exactly as it did, because the child doesn’t change anything yet.
  4. On classic themes, Customizer settings and menu locations are saved per theme, so set them again for the child. Our guide to changing a theme covers what moves.

6. Make your changes

  • Override a template: copy the file from the parent into the same place in the child, then edit the copy. The child’s file wins.
  • Add PHP: put it in the child’s functions.php. Unlike templates, it doesn’t replace the parent’s functions.php: both load, the child’s first.
  • Don’t copy the parent’s functions into the child. Two functions with the same name stop the site with a fatal error.
  • Link to the child’s own files with get_theme_file_path() and get_theme_file_uri(), which look in the child first.
  • Test on a staging copy, and if a change breaks the site, our guide to the white screen of death shows how to get it back.

Or let a plugin do it

Two plugins create child themes without touching files by hand. Both details were checked in the WordPress.org directory on 9 November 2026:

PluginForActive installsLast updated
Create Block ThemeBlock themes, from the Site Editor (by WordPress.org)20,000+1 Oct 2026
Child Theme ConfiguratorClassic themes, from wp-admin300,000+10 Jun 2025

Child Theme Configurator hasn’t been updated since June 2025 and was last tested with WordPress 6.8, so try it on a staging copy first.

Where WPOS fits

Most design changes don’t need a child theme at all. WPOS puts an AI agent inside wp-admin on the sites you already run, on any host. It edits natively in the builder each site already uses, whether that’s Gutenberg, Elementor or Divi, keeps custom code in snippets that survive theme updates, and checks the result with a browser screenshot before it reports done:

“Make the links on the blog the same blue as our logo, add a Book a call button to the header, and screenshot the blog and a post on desktop and phone.”

WPOS is our product, so weigh this section accordingly; you can try it free for 30 days with 5,000 credits, a live site plus a staging sandbox, and no card.

Frequently Asked Questions

A theme that takes everything from another theme, its parent, and holds only your changes. When the parent theme updates, your changes stay, because they live in the child's files rather than the parent's.

Often not. Colors, fonts, layouts and template changes made in the Site Editor are saved in the database and survive theme updates. You need a child theme to change the theme's files: its theme.json, templates, patterns or PHP.

No, that's what a child theme is for. An update replaces the parent theme's files, so edits made directly in them are lost, but the child theme's files are left alone.

No. WordPress has two levels, parent and child. If you need more, copy the child into a full theme of its own, or keep the extra changes in a plugin.

Usually the Template line in style.css doesn't exactly match the parent theme's folder name, or, on a classic theme, the parent's stylesheet isn't being loaded. Check the folder name in wp-content/themes and the enqueue code in functions.php.

Yes, activate the parent under Appearance → Themes at any time. On classic themes, Customizer settings and menu locations are saved per theme, so you may need to set them again.

Black Fridayends Nov 30

Start free with 15,000 credits.

Three times the usual 5,000, no card needed. Then 50% off your site licences for 2 months with FRIDAY50.

Claim 15,000 credits