If you ever plan to customize a WordPress theme — change CSS, edit a template file, add functions — you need a child theme. Modifying the parent theme directly means losing your changes the next time the parent updates. A child theme makes your customizations permanent.
Why child themes matter
WordPress themes get updates. The developer fixes bugs, adds features, updates compatibility. When the parent theme updates, WordPress overwrites every file in the theme folder.
If you edited style.css or functions.php in the parent, your changes are gone after the update.
A child theme is a separate folder that points to the parent. Your customizations live there. Updates to the parent leave your child untouched.
When you need one
You need a child theme if you plan to:
- Modify CSS beyond what the Customizer lets you change.
- Override a template file (single.php, archive.php, etc.).
- Add custom functions to functions.php.
- Add custom code snippets that should live in the theme.
You don’t need one if you only:
- Change settings through the Customizer.
- Use the theme’s built-in options.
- Add CSS via Customizer → Additional CSS (this survives updates already).
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 it. Total file count: 2.
Setup walkthrough
Step 1: Create the folder
Via SFTP or your host’s file manager, navigate to /wp-content/themes/.
Create a new folder. Name it the parent theme’s name with “-child” appended.
If your parent theme is “Aurora,” the child folder is “aurora-child.”
Step 2: Create style.css
Inside the child folder, create style.css 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 is Template:. Set it to the parent theme’s folder name (not display name). For Aurora’s parent folder name, check the parent’s folder in /wp-content/themes/ — it might be “aurora-pro” or similar.
Below the header, you can add your custom CSS. It loads after the parent’s styles.
Step 3: Create functions.php
Inside the child folder, create functions.php 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 and then the child’s. Without this, the parent’s styles wouldn’t load.
Step 4: Activate the child theme
WordPress → Appearance → Themes. You’ll see “Aurora Child” listed.
Click Activate.
The site should look identical to before — the child theme inherits everything from the parent.
Adding customizations
CSS overrides
Add CSS to the child’s style.css below the header. It loads after the parent’s CSS and overrides where rules conflict.
Example:
.site-title {
font-family: 'Playfair Display', serif;
color: #333;
}
Template overrides
Copy a template file from the parent theme to the child folder. WordPress uses the child’s version if it exists.
Example: to customize how single posts display, copy single.php from the parent to the child folder. Edit the copy. The child’s version is used.
Be careful: if the parent updates its single.php with bug fixes, your child’s copy stays at the old version. You may need to manually merge changes.
Function additions
Add custom functions to the child’s functions.php. They run alongside the parent’s functions.
Example:
function add_custom_excerpt_length() {
return 40;
}
add_filter('excerpt_length', 'add_custom_excerpt_length');
The “screenshot.png” optional file
If you want a thumbnail in the Themes panel, add a screenshot.png in the child folder. 1200×900 pixels. Not required but looks nicer.
The “I need to override a function” problem
Adding to functions.php works for new functions. Overriding existing functions from the parent is trickier.
Two approaches:
Pluggable functions
Some theme functions are wrapped in if (!function_exists()). You can override these in the child by defining a function with the same name.
Hooks and filters
Most modern themes use WordPress’s hooks system. You can attach your own code to existing hooks or remove the parent’s filters and add your own.
Read the parent theme’s documentation to see what hooks it exposes.
What NOT to put in a child theme
- Plugin functionality. Custom post types, shortcodes, or features that should work regardless of theme — these belong in a plugin, not the theme.
- Content. Posts, pages, media — these live in the database, not the theme.
- Site-wide configuration. Settings live in WordPress options, not theme files.
If you switch themes later, the child theme goes with the old theme. Don’t put critical functionality there if it should survive a theme switch.
Switching themes when you have a child
If you decide to switch themes:
- Deactivate the child theme.
- Activate the new theme.
- The child theme stays around (in case you switch back) but is inactive.
- Your CSS customizations from the child don’t apply to the new theme.
- Template overrides from the child also don’t apply.
This is one reason CSS customizations might be better placed in Customizer → Additional CSS than in a child theme — Customizer CSS persists across themes.
Multiple custom themes
You can only run one theme at a time. If you switch frequently between custom looks, consider:
- Using a theme that supports multiple “style variations” (block themes especially).
- Or just maintaining multiple child themes and switching between them.
Child theme plugins
Several plugins can generate child themes automatically:
- Child Theme Configurator. Generates and manages child themes.
- WPS Child Theme Generator. Simple alternative.
For one-off setup, the manual approach is just as fast and gives you better understanding. For developers managing many sites, plugins save time.
The honest summary
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.
