WordPress Child Theme: How to Create One, Step by Step
By Manob Editorial ·

A WordPress child theme is a small theme that inherits everything from a parent theme and overrides only what you change. To create one, make a folder in wp-content/themes, add a style.css with a Template line naming the parent folder, then activate it under Appearance > Themes. Parent updates then no longer erase your edits.
The handbook puts it plainly: "Child themes are extensions of a parent theme. They allow you to modify an existing theme without directly editing that theme's code" (WordPress Theme Handbook, read December 2026). It adds that this means "you (or your child theme's users) can still receive updates to the parent theme without losing those modifications." This guide covers creating one. Updating the parent is a separate job, covered in how to update a WordPress theme, and switching themes is in how to change a WordPress theme.
Do you need a child theme?
Often you do not. Many changes never touch the theme's files, so an update cannot remove them:
- Customizer settings, colors, logo and menus. These are saved in the database, not in theme files.
- Additional CSS. In a classic theme, go to Appearance > Customize > Additional CSS. It is stored in the database too.
- Block theme edits in the Site Editor. Changes made in Appearance > Editor are saved as your own customizations.
You need a child theme when you edit the parent's PHP template files, add functions to its code, or keep a large block of CSS in a file under version control. If that is not you, skip this guide and read how to customize a WordPress theme instead.
Check first: does your theme already include one?
Many premium themes ship a child theme inside the download, usually as a second zip or a folder next to the main theme file. Open the product's documentation or your download package and look for a name ending in "child". If it is there, install and activate it as described in how to install a WordPress theme manually, and skip the next section. Our guide to premium WordPress themes lists what else to look for in a package.
How do you create a child theme by hand?
These steps work for a classic theme. A block theme needs only two of them, as the next section shows.
Step 1. Find the parent theme's folder name
Connect by FTP or your host's file manager and open wp-content/themes. Write down the exact folder name of the parent, for example twentytwentyfour. The handbook says the Template value "must match the parent theme's folder name exactly" (child themes handbook). The name shown in the dashboard is not always the folder name, so check the folder.
Step 2. Create the child folder
In the same wp-content/themes directory, create a folder named after your child theme in lowercase with hyphens, such as twentytwentyfour-child. The handbook's example uses a kebab-case name for the same reason.
Step 3. Add style.css with the header
Create a file called style.css inside the new folder. WordPress requires the file; per the main stylesheet page, Theme Name is the field it needs to recognize a theme. A child theme adds Template:
/*
Theme Name: Twenty Twenty-Four Child
Template: twentytwentyfour
Author: Your Name
Version: 1.0.0
*/
Put the header at the very top of the file. Anything you want to add as CSS goes below it.
Step 4. Add functions.php to load the parent's styles
Many classic themes load their stylesheet in a way that does not include a child's files automatically, and the handbook shows how to enqueue both. Create functions.php in the child folder with:
<?php
add_action( 'wp_enqueue_scripts', 'my_child_enqueue_styles' );
function my_child_enqueue_styles() {
wp_enqueue_style(
'my-child-parent-style',
get_parent_theme_file_uri( 'style.css' )
);
wp_enqueue_style(
'my-child-style',
get_stylesheet_uri(),
array( 'my-child-parent-style' ),
wp_get_theme()->get( 'Version' )
);
}
The handbook's own example enqueues the parent stylesheet with get_parent_theme_file_uri( 'style.css' ). Check your parent first. If it already enqueues its own stylesheet, or builds its CSS from another file, the first call may be unnecessary or wrong. The theme's documentation will say which. A child's functions.php does not replace the parent's: the handbook says they "are both loaded, with the child being loaded immediately before the parent." Never copy the parent's functions.php into the child.
Step 5. Activate and check
Go to Appearance > Themes. The child appears as a new theme. Click Live Preview first, compare with your live site, then click Activate. After activating:
- Open the home page, a post, a page and the contact page. Layout and fonts should look as they did.
- If the site looks unstyled, the enqueue step is wrong. Re-check the parent folder name and the stylesheet handle.
- Open Appearance > Menus (or Editor > Navigation) and Appearance > Widgets. Settings saved for the parent can appear empty, because they belong to the parent theme. Reassign them once.
Step 6. Override a template file
To change a template, copy the file from the parent into the child folder, keeping the same relative path, then edit the copy. For example, copy single.php from the parent into the child folder and change it there. WordPress uses the child's version and falls back to the parent for every other file.
How do you make a child theme for a block theme?
A block theme styles itself mostly through theme.json, so the enqueue code in Step 4 is optional. The handbook says style handling is often not needed for block themes because it is generally done through theme.json. The child still needs style.css with the Template line. Add a minimal theme.json beside it:
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2
}
That is the minimal example in the theme.json introduction, which says to always set the version property because WordPress reads the file as version 1 if it is missing. Use the version number the handbook and your parent theme currently use. Then add only the settings you want to change, such as a color palette or font sizes, and leave the rest to the parent. To replace a template, part or pattern, add a file of the same name in the child. For a pattern, the handbook notes the registered Slug field must match.
The Create Block Theme plugin shortcut
The Create Block Theme plugin lists "Create a child theme of the active parent theme" among its features. After you install and activate it, its panel appears in the Editor, through an icon to the right of the Save button. The plugin page says the older options under Appearance > Create Block Theme are deprecated. Activate the parent, open the Editor, use the plugin to create the child, then check the new folder in Appearance > Themes before you activate it.
What should you check before trusting the child theme?
| Check | Where | What good looks like |
|---|---|---|
| Theme is recognized | Appearance > Themes | Child listed, with the parent named in its details |
| Styles load | Front end of the site | Same fonts and layout as before |
| Menus and widgets | Appearance > Menus and Widgets | Locations assigned again if empty |
| Parent can update | Appearance > Themes | Parent still lists its own update notice |
When a child theme is not the right tool
The handbook says there are only two levels in the theme hierarchy: a parent and a child. You cannot stack a grandchild theme. A child theme also cannot rescue a parent that is badly built or abandoned, because your child still runs on its code. If you want deep changes to layout and behavior, a developer may suit you better; see how to hire a WordPress developer or browse development services. For a different design altogether, switching themes beats patching one. Our guide to changing your WordPress theme covers that.
Frequently asked questions
Do I need a child theme if I only add CSS?
No. Use Appearance > Customize > Additional CSS in a classic theme, or the Styles panel in the Site Editor for a block theme. Those are stored in the database, so a theme update does not remove them. A child theme only helps when you want the CSS kept in a file.
Does a child theme slow down a site?
Not by itself. WordPress loads a small extra stylesheet and functions file. Slowness comes from heavy plugins, large images and a poor host, rarely from the child theme.
Why does my site look broken after activating the child theme?
Usually the parent's styles are not loading, or the Template line does not match the parent's folder name. Check the folder name in wp-content/themes, then check the enqueue function against the parent's documentation. Switching back to the parent restores the old look right away.
Will my Customizer settings carry over to the child theme?
Not always. Theme options are saved per theme, so menus, widgets and some Customizer values can look reset after you activate the child. Reassign them once and note your settings before switching. Our guide to changing a WordPress theme covers the same issue.
Can I add a child theme to a premium theme I bought?
Usually yes, and the download often includes one. Check the theme's license and documentation; our license page explains what a purchase covers. Building the child yourself works the same way as the steps above.
How do I update the parent after I create a child?
Update the parent as normal. Your changes live in the child folder, so they stay. After an update, check any template files you copied, because the parent's version may have changed. The steps are in how to update a WordPress theme.