In short: A child theme is a small theme you install on top of a WordPress theme, holding only the files you change. When the parent theme updates, your changes stay in place. It starts with at least a style.css file, but not every site needs one. In this post I explain when you need it, how I set it up and the mistakes junior designers often make.
Child theme: the short version
Imagine you want to move the header in a ready-made theme, or add a new field to a template. The easiest route seems to be opening the theme’s own file and editing it. But at the next update the theme rewrites its own files, and your work is gone. This is exactly where a child theme comes in: you keep your changes outside the parent theme, in your own folder.
I’ve been building sites for twenty-six years, and I still often see this mistake in WordPress sites I take over. In this post I first explain the logic, then the three-step setup. After that I cover the difference in block themes, the cases where a child theme is unnecessary, and a checklist.
What does a child theme do?
According to the WordPress documentation, a child theme is an extension of a parent theme. It lets you change the parent theme without editing its code. It also inherits everything from the parent theme by default; you only add the part you want to be different (WordPress Developer Resources).
The real benefit comes with updates. The WordPress documentation for the theme file editor warns clearly: if you update the theme, all the changes you made are lost. The same page recommends a child theme as the best way to prevent this. It also reminds you that the editor doesn’t make backups (WordPress Documentation).
So you can keep the parent theme up to date with security and compatibility updates, while your own touches live in a separate folder. I explained why updates shouldn’t be postponed in my post on website maintenance.
How do the parent theme and child theme work together?
Think of the relationship between the two themes as layers. The bottom layer is the parent theme; the top layer is your theme. When WordPress looks for a file, it checks the top layer first. If it doesn’t find it there, it moves on to the parent theme. But not every file type behaves the same way.
Template files replace each other
If you put a file in your own folder with the same name as a template in the parent theme, WordPress opens your file. This rule applies to templates, template parts and patterns. For patterns, the registered slug must also match. You can, of course, add new templates and patterns too.
In block themes the order is a little longer. WordPress first looks for a template the user has saved on the site, then the templates folder in your theme, and finally the parent theme (Template Hierarchy). So if you’ve changed your file but see no difference on screen, first check whether there’s a saved template in the site editor.
Both functions.php files run
functions.php behaves differently. The functions.php in your theme doesn’t override the parent’s; WordPress loads both and runs yours just before it. So don’t copy the contents of the parent theme’s functions.php into your own file. According to the documentation, functions with the same name will most likely cause a fatal error, and the site falls to a white screen.
That’s why you should only write new code in your own functions.php. For example, this file is enough for adding a stylesheet, registering a new menu location or writing a small filter. Also, write a short comment above every piece of code you add. Even if the person opening the site six months later is you, those notes save time.

Setting up a child theme: three steps
You don’t need a special tool for the setup. A folder, a stylesheet and, most of the time, a short functions.php are enough. I always start on a local copy or a staging environment, never on the live site.
1. The folder and style.css
Create a new folder inside wp-content/themes, for example “anatema-child”. Put a style.css file in it. According to the documentation, this is the only file a child theme strictly requires. Two fields in the header matter: Theme Name and Template. The Template value must match the parent theme’s folder name exactly (Main Stylesheet).
/*
Theme Name: Ana Tema Child
Template: anatema
*/
2. Loading the stylesheet
Some parent themes load both stylesheets themselves; in that case you don’t need to do anything. If yours doesn’t, add the parent theme’s stylesheet in functions.php using the wp_enqueue_scripts hook. The example in the documentation uses the get_parent_theme_file_uri function for this.
There are two functions here that juniors mix up most often. get_stylesheet_directory_uri returns the address of the active theme, that is, the child theme folder. get_template_directory_uri always points to the parent theme’s folder (WordPress Code Reference). Meanwhile, since version 4.7.0, get_theme_file_uri looks in the child folder first and falls back to the parent theme if the file isn’t there (get_theme_file_uri).
3. Activating and testing
Activate the new theme from the Appearance menu. Then open the home page, a post, a form and the mobile view one by one. Because menu locations and some settings are tied to the theme, you may need to assign them again. I combine these checks with the list in my post on launching a site.
Child themes in block themes
In block themes most of the styling lives in the theme.json file. That’s why, according to the documentation, loading the style.css file is often unnecessary. The order still follows the layer logic: WordPress defaults, then the parent theme, then the child theme, and at the top the changes the user makes in the site editor.
In practice, my advice is this: if you want to change the color palette or fonts, put your own theme.json file in the child theme. But if the client also changes the same setting in the site editor, their choice takes precedence over yours. Explaining this order to the client before handover prevents the later question, “why won’t the color change?” Also, when you add a new template to your theme, you see it in the site editor too, so the client can assign that template to their own pages.
When is a child theme unnecessary?
I don’t set up a child theme on every site by reflex. For example, if the client is only changing the logo, colors and fonts, the theme’s own settings or the site editor are enough. For a few lines of CSS, WordPress’s Additional CSS field is usually enough too. And in a custom theme you wrote yourself, a child theme makes no sense, because you’re the one doing the updates anyway.
In short, I ask a single question: will this change survive the next update of the parent theme? If yes, there’s no need for an extra layer. If no, meaning you’re changing a PHP template or a function, a child theme is the right tool.
At the other extreme, be careful if you’re changing half of the parent theme. The documentation notes that too much customization becomes a maintenance burden over time. In such cases, forking the theme or building a custom theme is the better decision. I discussed this choice in detail in my post ready-made theme or custom theme. Finally, there’s one more limit: you can’t make a grandchild theme. The system has only two levels, the parent theme and the child theme.
Common mistakes juniors make
- A typo in the Template field: Writing “anatema” when the folder name is “AnaTema” breaks the theme. Copy and paste the folder name.
- Copying every file: If you copy a template you haven’t changed, the parent theme’s fixes to that file never reach you. Only take the files you change.
- Editing the parent theme from the dashboard: The theme file editor doesn’t make backups. If a faulty line takes the site down, you have to fix it over FTP.
- Never testing updates: The templates you copied can become incompatible with a new version of the parent theme. So compare your copied files after every parent theme update.
After handover, you can use the free site test to check the site’s speed, mobile view and basic settings. The test scans the address and shows the results in a single report.
Checklist: child theme
- Need: The change can’t be made through the settings panel or Additional CSS.
- Environment: The first setup and tests happen on a local copy or a staging environment.
- style.css: Theme Name is present, and the Template value matches the parent theme folder exactly.
- functions.php: It contains only your own code; no functions copied from the parent theme.
- Files: The folder holds only the templates you changed.
- Record: You’ve written a short note on which file you changed and why.
- Updates: The parent theme is up to date, and you checked the site page by page after updating.
Frequently asked questions
Is a child theme the same as an “alt tema”?
Yes. In the Turkish WordPress dashboard you see the names “alt tema” (child theme) and “ana tema” (parent theme). Among developers, though, the English name is more common.
What happens if I delete the parent theme?
Your theme stops working too, because the Template field in style.css points to the parent theme and most templates come from there. Don’t delete the parent theme; just keep it up to date.
Does a child theme slow down the site?
On its own it doesn’t add any serious load. What really determines speed is the weight of the parent theme, the plugins and the images. I covered this topic separately in my posts on speed.
Does changing a ready-made theme with a child theme make it a custom theme?
No. The underlying structure, the weight and the dependence on updates stay with the parent theme. A child theme only keeps your changes safe.
This post is based on information current as of November 2026. WordPress theme behavior can change between versions; for the latest details, see the official documentation in the sources.
Sources
- WordPress Developer Resources, Child Themes
- WordPress Documentation, Theme File Editor Screen
- WordPress Developer Resources, Template Hierarchy
- WordPress Developer Resources, Main Stylesheet (style.css)
- WordPress Code Reference, get_template_directory_uri()
- WordPress Code Reference, get_stylesheet_directory_uri()
- WordPress Code Reference, get_theme_file_uri()


