A WordPress child theme is a theme that inherits the styling and functionality of another theme, called the parent theme. Activating a child theme tells WordPress to use the parent for everything except files the child overrides. The whole point: when the parent theme is updated by its developer (which happens regularly, often with security fixes), your customizations survive untouched. Without a child theme, every customization you make to a theme is wiped out on the next update. With one, your changes live in a separate folder that updates leave alone.
Why do I need a child theme in 2026?
Three reasons that have not changed in fifteen years:
- Survive parent theme updates. Theme developers ship updates monthly or more. Each update overwrites every file in the parent theme folder. If you edited
header.phporstyle.cssdirectly, your edits are gone. A child theme has its own folder that updates never touch. - Override targeted files only. A child theme can selectively replace any file from the parent. Want a custom
footer.php? Drop it into the child theme. Want the same footer.php as the parent but with one CSS tweak? Just add the CSS to the child'sstyle.cssand leave footer.php alone. - Add custom PHP without forking the theme. The child theme's
functions.phploads alongside the parent's. Add filters, custom post types, removed actions, or any PHP without touching parent code.
The "but I will just edit the parent" approach breaks the first time the theme auto-updates, which on a typical WordPress site happens within weeks. Use a child theme.
When do I NOT need a child theme?
Three scenarios where a child theme is the wrong tool:
- If you only customize through the Customizer or Site Editor. Color changes, font choices and similar settings made via Appearance, Customize (Classic) or the Site Editor (Block themes) are stored in the database, not in theme files. They survive updates without a child theme.
- If you only add custom CSS. WordPress has a built-in "Additional CSS" panel in the Customizer. Small CSS tweaks live there and persist across updates. A child theme is overkill for adding two CSS rules.
- If you use a block theme (FSE) and only customize templates. Full Site Editing themes store template customizations in the database, accessible via Appearance, Editor. The need for a child theme is much smaller. Block themes can still benefit from a child theme for custom PHP or theme.json overrides, but the common case of "I want to move the logo and change the footer text" no longer requires one.
If you find yourself editing PHP files, template files, or wanting to add more than a few CSS lines, you need a child theme. For everything else in 2026, the Customizer or Site Editor is enough.
Method 1: install a child theme manually (5 minutes)
The minimal child theme is two files in a folder. Step by step:
Step 1: create the child theme folder
Connect via SFTP (or the file manager in your hosting panel) and navigate to /wp-content/themes/. You will see folders for every installed theme, like twentytwentyfour/ or astra/. Create a new folder next to them. Naming convention: parent name plus -child. If your parent theme is Astra, name the folder astra-child.
Step 2: create style.css with the required header
Inside your new astra-child folder, create a file called style.css. Open it in a text editor and add this header comment block:
/*
Theme Name: Astra Child
Theme URI: https://yoursite.com
Description: Child theme for Astra
Author: Your Name
Author URI: https://yoursite.com
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/The Template line is the only one that must match exactly: it has to be the folder name of the parent theme (case-sensitive). The other lines can say whatever you want; they show up in Appearance, Themes.
Step 3: create functions.php to enqueue parent styles
In the same astra-child folder, create functions.php:
<?php
add_action('wp_enqueue_scripts', function () {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
wp_enqueue_style('child-style', get_stylesheet_uri(), ['parent-style']);
});This makes sure the parent theme's stylesheet loads first, then the child's, so your customizations override the parent. Without this, the child theme's style.css is empty and the site loads unstyled. Many old tutorials still recommend using @import url('../astra/style.css'); in the child's style.css instead. Do not use the @import approach in 2026. It is slow (forces a second HTTP request before any CSS parses), no longer recommended by the WordPress codex, and the enqueue approach above is the modern standard.
Step 4: activate the child theme
Go to Appearance, Themes in the WordPress admin. You will see your new child theme listed (it may show a placeholder thumbnail). Click Activate. Your site should look identical to before — same fonts, same layout, same colors — because the child inherits everything from the parent.
If the site looks unstyled, the enqueue in functions.php is wrong. Double-check the Template: line in style.css matches the parent folder name exactly.
Method 2: use a child theme plugin (zero coding)
For users who would rather not touch SFTP, plugins automate the child theme creation. Two reliable choices in 2026:
- Child Theme Configurator. Free, actively maintained, the most popular option. Installs in two clicks, creates the child theme from any active parent, lets you copy parent files into the child for editing through the admin UI. The pragmatic choice for most users.
- Generate Child Theme. Newer plugin focused specifically on block themes. Useful if you are using a Full Site Editing theme like Twenty Twenty-Four where the patterns are different.
Plugin approach steps:
- Install and activate the plugin.
- Go to Tools, Child Themes (Child Theme Configurator) or its equivalent.
- Select the parent theme.
- Click "Create New Child Theme".
- The plugin generates the folder, style.css and functions.php correctly. Go to Appearance, Themes and activate.
The plugin can be deactivated after creating the child theme. The child theme itself does not depend on the plugin.
How do I customize the child theme once it is active?
Three categories of customization:
CSS customizations
Add CSS rules to the child theme's style.css, below the header comment. The child's CSS loads after the parent's, so your rules override unless the parent uses !important or higher specificity selectors.
/* In astra-child/style.css */
.site-title {
font-family: Georgia, serif;
color: #2c3e50;
}
.entry-content a {
text-decoration: underline;
}Template overrides
To customize a template file (header, footer, single post layout, etc.), copy the file from the parent theme into the child theme at the same path. WordPress will then use the child's version instead.
Example: customize footer.php:
- Copy
wp-content/themes/astra/footer.phptowp-content/themes/astra-child/footer.php. - Edit the child's copy.
- Save. The next page load uses your version.
Block themes are different: instead of PHP template files, they use HTML files in a templates/ folder, and theme.json for global styles. The override mechanic is the same; copy the file from the parent into the child at the same relative path.
PHP customizations
Add filters, actions or custom code to the child's functions.php — never to the parent's. The child's functions.php loads before the parent's, so it can register filters that the parent later checks for.
// In astra-child/functions.php
// Change the WordPress login logo URL
add_filter('login_headerurl', function () {
return home_url();
});
// Disable WordPress emojis
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');How do I move my Customizer settings to the child theme?
Common pain point: you set up colors, fonts and widgets in the Customizer under the parent theme. Activating the child theme appears to reset them.
The truth: Customizer settings are stored per-theme. Each theme (parent and child are different "themes" to WordPress) has its own settings. To preserve your settings:
- Under the parent theme, go to Appearance, Customize, click the gear icon and "Export" (some themes provide this; not all). Or use a plugin like Customizer Export/Import.
- Activate the child theme.
- Go back to the Customizer and import the file.
If your theme does not support Customizer export, the alternative is to manually configure the same settings under the child theme. For widgets, WordPress 4.2+ provides a "Widget Importer & Exporter" workflow via the Tools menu or via plugins like Widget Importer Exporter.
What about block themes (Full Site Editing)?
For block themes (Twenty Twenty-Two onward, and modern themes built on FSE), the child theme structure is slightly different. The minimum two files become:
- style.css with the same header block, but
Template: parent-theme-folderreferencing the parent block theme. - theme.json in the child folder. This file overrides the parent's theme.json. Only include the settings you want to change; the parent's values are used for everything else.
You can also override templates by copying parent template HTML files from templates/ and parts/ into the child theme at the same path.
The Full Site Editor in WordPress admin can read child theme overrides and lets you customize templates visually. Customizations made in the editor are stored in the database and survive theme updates; you only need the child theme for things you cannot configure through the editor (like custom PHP in functions.php).
Common mistakes when installing a child theme
- Wrong
Template:name in style.css. If the value does not match the parent theme folder name exactly (case-sensitive), WordPress treats the child as a broken theme. The folder name, not the display name, is what counts. - Forgetting
<?phpat the top of functions.php. The file is silently treated as text, parent styles do not enqueue, and the site loads unstyled. Always start PHP files with<?php. - Using @import in style.css to load parent CSS. Works but slow and discouraged. Use the wp_enqueue_style approach in functions.php.
- Copying every parent file into the child "to be safe". Do not. Copy only files you actually want to override. Files in the child that match the parent will use the child version; files only in the parent will use the parent version. Bulk-copying defeats the maintainability benefit of a child theme.
- Editing the child theme on a live site with no staging. One bad line in functions.php white-screens the site. For non-trivial PHP edits, use a staging environment or at least a code-snippet plugin that catches PHP errors before saving.
- Naming the child theme folder with spaces. Stick to lowercase letters and hyphens. Spaces and special characters break the
Template:reference on some servers. - Switching parent themes without deleting the child. A child theme references its parent by name. If you switch to a different parent theme without updating the child, the child becomes broken. Either delete the child or update its
Template:line.
How do I update a parent theme without breaking the child?
This is the whole point of a child theme: parent updates should not break it. Three scenarios:
- Normal updates. Click "Update" in the admin. The parent theme folder is replaced; the child folder is untouched. Verify the site still looks right.
- Major version updates (1.x to 2.x). Sometimes templates change significantly. If your child theme overrides templates, the override may now reference functions or hooks that no longer exist. Check the parent theme's changelog before major updates. Test on staging.
- Parent theme abandoned. If the parent stops getting updates (security fixes), your child is stuck on a vulnerable theme. The migration is to a maintained parent theme. The child theme makes this easier because most of your custom CSS and PHP can be reused; only template overrides need to be redone.
Where can I find which theme files to override?
WordPress's template hierarchy documents which file is loaded for which content type. Common ones:
header.php— top of every pagefooter.php— bottom of every pagesingle.php— single blog post layoutpage.php— single page layoutarchive.php— category/tag/author archivesfunctions.php— PHP customizationsstyle.css— CSS
For block themes, the equivalents live in templates/ as .html files and in theme.json for styling.
What InspectWP checks
InspectWP detects whether a theme is a child theme via the Template: field in style.css. The Report's WordPress section lists both the parent and the child theme, with versions and last-update dates. A site running a child theme with a parent that has not been updated in over a year is flagged because the parent likely has unpatched vulnerabilities. A site running an outdated child theme on an up-to-date parent is informational; it usually means the developer who set up the site stopped maintaining the child but the parent continues to get security fixes through the parent maintainer. The pragmatic recommendation is to keep both updated, document the child theme's customizations in its style.css header, and prefer child themes over direct edits even on managed-hosting setups where automatic theme updates are common.