TL;DR
Create a WordPress child theme when theme-specific changes need to survive parent theme updates. Keep functionality that should survive a theme switch in a plugin instead.
- A classic child theme needs a folder, style.css with the exact Template folder name, and usually functions.php.
- Load parent and child CSS with enqueue functions so order, cache, and dependencies stay predictable.
- Test activation on staging because menus, widgets, templates, CSS, and caches can change.
Use a Child Theme for the Right Kind of Change
A child theme protects changes from parent theme updates. It is the right place for template overrides, theme-specific PHP adjustments, custom styles tied to the theme, and small frontend behavior that belongs with presentation. It is not always the best place for site functionality such as custom post types, analytics, shortcodes, or integrations that should survive a future theme switch.
Before creating one, decide whether the change belongs in a child theme, a small custom plugin, the WordPress Site Editor, custom CSS, or a page builder setting. That decision keeps the site easier to maintain later.
Required Child Theme Files
A classic child theme needs a folder inside wp-content/themes and a style.css file with a valid theme header. The critical line is Template, which must match the parent theme folder name exactly, not the display name.
Most child themes also include functions.php to enqueue styles. WordPress loads the child functions file in addition to the parent, not instead of it. That means child functions should add or override carefully rather than redeclaring parent functions that already exist.
Load Parent and Child CSS Predictably
CSS problems often come from enqueue order. The child stylesheet should usually load after the parent stylesheet so overrides can win. Use clear handles and dependencies instead of hard-coding link tags into header.php. This keeps cache, versioning, and plugin optimization tools more predictable.
If child theme CSS is not loading, check the Template value, active theme, browser network panel, cache, file path, and dependency handle. If it loads but does not override the parent, inspect the CSS specificity and whether the parent theme loads additional styles after the child sheet.
Override Templates Only When Necessary
Copying parent templates into a child theme gives control, but it also creates maintenance responsibility. When the parent theme updates that template later, your child copy may miss security fixes, accessibility improvements, or layout changes. Override the smallest template file that solves the problem.
For block themes, check whether the Site Editor, patterns, template parts, and theme.json can solve the change before copying files. A block theme child workflow is different from a classic PHP template workflow, and mixing them without understanding the theme can create confusing results.
Test Before Activating on Production
Activating a child theme can change menus, widgets, customizer settings, template assignments, image sizes, and cached CSS. Test on staging first. Compare the homepage, posts, pages, archives, WooCommerce templates if present, forms, search, mobile navigation, and logged-in admin pages.
Keep a rollback path. The parent theme should still be installed. The child theme folder should be backed up. If the site depends on a cache plugin or CDN, clear cache after activation and inspect the frontend as a logged-out visitor.
Child Theme Checklist
- Folder name is lowercase, stable, and not the same as the parent theme.
style.cssincludes Theme Name and exact Template folder name.functions.phpenqueues parent and child styles without duplicate links.- Template overrides are limited and documented.
- CSS is tested after cache is cleared.
- Homepage, posts, archives, forms, navigation, and mobile layouts are checked on staging.
- A rollback plan exists before production activation.
Frequently Asked Questions
Can I create a child theme without coding?
Yes, a generator can create the required files. You still need to review the output, install it on staging, activate it, and test the theme behavior.
Does a child theme slow WordPress down?
A basic child theme has minimal impact. Performance problems usually come from extra assets, inefficient PHP, duplicated CSS, or plugin optimization conflicts.
Can I use a child theme with a block theme?
Yes, but first check whether the Site Editor and theme.json can handle the change. Block theme child workflows may involve templates, parts, patterns, and design settings rather than only PHP files.