What is a WordPress child theme?
A WordPress child theme is a small theme that inherits everything from a parent theme and holds only your changes. When the parent updates, your custom CSS, templates and functions survive. You can create one with two files, style.css and functions.php, or with a plugin, and many premium themes ship a ready-made child theme in their download package.
Best for: site owners who edit theme files or CSS and want those changes to survive updates
Did you edit a theme file, then lose the change after an update? That is exactly the problem a WordPress child theme solves. It sits on top of the parent theme, inherits its design and features, and stores only what you change. In this guide, we explain when you need one and how to create it in about ten minutes.
Do you actually need a child theme?
You need one if you edit theme files, such as templates, functions.php or the theme’s own stylesheet. You do not need one for small CSS tweaks. The Customizer’s Additional CSS panel and the Site Editor’s styles survive theme updates. Likewise, page builder layouts live in the database, so they are safe either way.
Before you build one yourself, check the theme’s download package. For example, many premium themes include a ready-made child theme zip. Installing it takes a minute and avoids mistakes.
Method 1: create a child theme with a plugin
For block themes, the free Create Block Theme plugin from the WordPress team does the work. Install it and choose the option to create a child theme of the active theme. The plugin writes the files for you.
For classic themes, a plugin such as Child Theme Configurator does the same job from a settings screen. Either way, you still activate the new child theme yourself under Appearance > Themes.
Method 2: create a WordPress child theme by hand
A classic child theme needs only two files in a new folder under wp-content/themes/, for example astra-child. The first file is style.css:
/*
Theme Name: Astra Child
Template: astra
*/
The Template line is the key. It must match the parent theme’s folder name exactly, not its display name. The second file is functions.php:
<?php
add_action( 'wp_enqueue_scripts', function () {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
} );
This loads the parent stylesheet first, so your own rules can override it. Some parent themes already load their stylesheet, and in that case you can skip this file. Then upload the folder and activate the child theme. A block child theme works the same way, and a theme.json file is only needed for settings you want to change.
What goes into the child theme
Put custom CSS in the child’s style.css and new functions in its functions.php. To change a template, copy that one file from the parent into the child and edit the copy. WordPress uses the child’s version first. However, copy only what you change, because every copied template stops receiving the parent’s fixes.
After you switch: quick checks
Activating a child theme can reset settings that WordPress stores per theme, such as menu locations and Customizer options. So check your menus, widgets and Customizer after the switch.
Not sure whether a site already uses a child theme? Our free WordPress Theme Detector shows both the child and its parent. Still choosing a parent theme? Start with our lightweight theme comparison.
WordPress child themes — quick answers
Will a child theme slow down my site?
Not noticeably. At most it adds one small stylesheet, and many parent themes load everything themselves.
Do I lose my changes when the parent theme updates?
No, not the changes inside the child theme. That is the whole point: an update replaces only the parent’s files.
Can I create a child theme of a child theme?
No. WordPress supports one level, a parent and a child.
Do premium themes include a child theme?
Many do. Look for a zip file ending in -child in the theme’s download package, or in its documentation.
Responsive Miracle 