If you ever plan to customize a WordPress theme, change CSS, edit a template file, or add custom functions, you need a child theme. Modifying the parent theme directly means losing every one of those changes the next time the parent theme updates. A child theme makes your customizations permanent instead of temporary.
Why child themes matter
WordPress themes get updates regularly. The developer fixes bugs, adds features, and keeps up with compatibility changes. When the parent theme updates, WordPress overwrites every single file in that theme’s folder.
If you edited style.css or functions.php directly in the parent theme, your changes disappear the moment that update installs.
A child theme is a separate folder that points back to the parent. Your customizations live in that separate folder, so updates to the parent leave your child theme completely untouched. The official WordPress child theme documentation covers the technical details if you want the full reference.
When you need one
You need a child theme if you plan to do any of the following:
- Modify CSS beyond what the Customizer lets you change.
- Override a template file, such as single.php or archive.php.
- Add custom functions to functions.php.
- Add custom code snippets that should live in the theme itself.
You don’t need one if you only do the following:
- Change settings through the Customizer.
- Use the theme’s built-in options.
- Add CSS via Customizer → Additional CSS, since that already survives updates on its own.
The minimum child theme
A child theme needs three things:
- A folder.
- A
style.cssfile with a special header. - A
functions.phpfile that enqueues the parent’s styles.
That’s the whole thing. Total file count: two.
Setup walkthrough
Step 1: Create the folder
Via SFTP or your host’s file manager, navigate to /wp-content/themes/.
Create a new folder there, and name it after the parent theme with “-child” appended.
If your parent theme is Aurora, the child folder should be named “aurora-child.”
Step 2: Create style.css
Inside the child folder, create a style.css file with this header:
/*
Theme Name: Aurora Child
Theme URI: https://yoursite.com/
Description: Child theme for Aurora
Author: Your Name
Author URI: https://yoursite.com/
Template: aurora
Version: 1.0.0
*/
The critical field here is Template:. Set it to the parent theme’s actual folder name, not its display name. To confirm Aurora’s parent folder name, check the parent theme’s own folder inside /wp-content/themes/, since it may be listed as “aurora-pro” or something similar depending on your install.
Below the header, you can add your own custom CSS. It loads after the parent’s styles, which is exactly why it can override them.
Step 3: Create functions.php
Inside the child folder, create a functions.php file with this content:
<?php
function child_theme_enqueue_styles() {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
wp_enqueue_style('child-style',
get_stylesheet_directory_uri() . '/style.css',
array('parent-style'),
wp_get_theme()->get('Version')
);
}
add_action('wp_enqueue_scripts', 'child_theme_enqueue_styles');
This enqueues the parent’s stylesheet first, then the child’s stylesheet after it. Without this step, the parent’s styles wouldn’t load at all, and your site would look broken.
Step 4: Activate the child theme
Go to WordPress → Appearance → Themes, and you’ll see “Aurora Child” listed there.
Click Activate.
The site should look identical to how it looked before, since the child theme inherits everything from the parent by default.
Adding customizations
CSS overrides
Add your CSS to the child’s style.css, below the header. It loads after the parent’s CSS and overrides it wherever the rules conflict.
Example:
.site-title {
font-family: 'Playfair Display', serif;
color: #333;
}
Template overrides
Copy a template file from the parent theme into the child folder, and WordPress will automatically use the child’s version instead whenever it exists.
For example, to customize how single posts display, copy single.php from the parent theme into the child folder, then edit that copy. WordPress uses the child’s version from that point forward.
Be careful here: if the parent theme later updates its own single.php with bug fixes, your child’s copy stays frozen at the old version. You may need to manually merge those changes yourself down the line.
Function additions
Add custom functions to the child’s functions.php, and they’ll run alongside the parent’s own functions rather than replacing them.
Example:
function add_custom_excerpt_length() {
return 40;
}
add_filter('excerpt_length', 'add_custom_excerpt_length');
The optional screenshot.png file
If you want a thumbnail image in the Themes panel, add a screenshot.png file to the child folder, sized 1200 by 900 pixels. It isn’t required, but it makes the Themes screen look tidier.
The “I need to override a function” problem
Adding new functions to functions.php is easy. Overriding an existing function from the parent theme is trickier, and there are two approaches.
Pluggable functions
Some theme functions are wrapped in if (!function_exists()). You can override these from the child theme by simply defining a function with the exact same name before the parent’s version loads.
Hooks and filters
Most modern themes use WordPress’s hooks system instead. You can attach your own code to existing hooks, or remove the parent’s filters and add your own in their place. The WordPress Plugin Handbook’s guide to hooks explains the mechanics if you’re new to this.
Read through the parent theme’s documentation to see exactly what hooks it exposes for this kind of customization.
What not to put in a child theme
- Plugin functionality. Custom post types, shortcodes, or features that should keep working regardless of which theme is active belong in a plugin, not the theme.
- Content. Posts, pages, and media all live in the database, not in theme files.
- Site-wide configuration. Settings belong in WordPress options, not in theme files.
If you ever switch themes later, the child theme goes inactive along with the old parent. Don’t rely on it for anything critical that needs to survive a full theme switch.
Switching themes when you have a child
If you decide to switch themes down the road, here’s what happens:
- You deactivate the child theme.
- You activate the new theme.
- The old child theme sticks around in your themes list, in case you ever switch back, but it stays inactive.
- Your CSS customizations from the child theme no longer apply to the new theme.
- Template overrides from the child theme also stop applying.
This is one reason CSS customizations are sometimes better placed in Customizer → Additional CSS rather than in a child theme, since Customizer CSS actually persists across theme switches. Our guide to adding custom CSS to WordPress walks through when each approach makes more sense.
Multiple custom themes
You can only run one theme at a time. If you switch frequently between different custom looks, consider using a theme that supports multiple built-in style variations, which block themes often do, or simply maintain several child themes and switch between them as needed.
Child theme plugins
Several plugins can generate a child theme automatically for you:
- Child Theme Configurator. Generates and manages child themes through a guided interface.
- WPS Child Theme Generator. A simpler, more lightweight alternative.
For a one-off setup, the manual approach outlined above is just as fast and gives you a better understanding of what’s actually happening. For developers managing many sites at once, a plugin like this can genuinely save time.
Child themes and future theme updates
Once your child theme is set up correctly, updating the parent theme becomes a non-event. This matters more than it sounds like it should: our guide on updating WordPress safely covers the broader update workflow, but the child theme piece specifically is what protects your customizations from disappearing the moment a new version ships.
The short version, if you’re skimming
If you’ll ever modify CSS, templates, or functions, set up a child theme first. Two files (style.css + functions.php) in a folder named yourtheme-child. Declare the parent in style.css with Template: parentfolder. Activate. Your customizations now survive parent theme updates. 10 minutes once; saves you from ever losing customizations again.
