Skip to content
Let’s Talk
Web Design

WordPress Child Themes: When You Need One and How to Use It Safely

WordPress child themes explained: what they are, when you need one, how they protect custom changes from theme updates, and when a block theme changes things.

By the Prism Works Studio team · · 7 min read

Key takeaways

  • A child theme holds your custom code separately, so updating the parent theme does not wipe out your changes.
  • You only need one if you are editing theme files or adding theme-level code; settings and content changes do not require it.
  • With block themes, many design changes live in the Site Editor, so check where a change belongs before creating a child theme.

A WordPress child theme is a small theme that inherits the design and features of another theme, called the parent, while letting you add your own code and template changes in a separate place. Its main job is protection: when the parent theme updates, your customisations stay intact. If you edit a parent theme directly, the next update can overwrite your work.

This guide explains when a child theme is worth using, how it works, and what to watch for. If you are still choosing how to build pages, our WordPress page builders guide is useful background.

How parent and child themes work

WordPress looks for files in the active theme first. When a child theme is active, WordPress checks the child for a template or stylesheet, and if it does not find one, falls back to the parent. That means the child only needs to contain the files you actually want to change.

A minimal classic child theme usually has:

  • A style.css file with a header comment naming the theme and declaring its parent through a Template line.
  • A functions.php file to load styles and add small pieces of custom code.
  • Optionally, copies of specific parent template files you want to override.

Block themes can also have child themes. In that case the child may include its own theme.json settings, templates or template parts, which take priority over the parent's versions.

When you need a child theme

A child theme makes sense when you are changing the theme's code rather than its settings. Typical cases include:

  • Overriding a template file, such as a single post layout or a WooCommerce template your theme provides.
  • Adding custom functions, hooks or filters that belong to the design layer.
  • Adding a meaningful amount of custom CSS that you want version-controlled.
  • Registering custom block styles or patterns tied to the theme.

If a developer has edited your parent theme directly, updates are risky. Moving those changes into a child theme is often one of the first jobs in a site tidy-up.

When you probably do not need one

Plenty of changes do not require a child theme:

  • Customiser or Site Editor settings. Colours, fonts, logos and layouts saved through the dashboard are stored in the database, not theme files, so updates do not erase them.
  • Page builder layouts. Content built with a page builder is stored as content.
  • Small CSS tweaks. The Additional CSS panel, or the styles interface in a block theme, can handle light adjustments.
  • Site functionality. Features that should survive a theme change, such as custom post types or tracking code, often belong in a small custom plugin rather than any theme.

That last point matters. If you put functionality in a child theme and later switch themes, the functionality disappears with it. Keep design in the theme and features in plugins.

Block themes and the Site Editor

Modern block themes change the picture. Many design decisions are now made in the Site Editor and saved to the database. You can edit templates, headers, footers and global styles without touching files.

That is convenient but has trade-offs:

  • Changes saved in the Site Editor override the theme's files, and future theme updates to those templates may not show until you reset your customisations.
  • Database-stored changes are harder to track in version control.
  • Moving them between staging and live sites needs care.

Some teams use a child block theme so templates and theme.json live in files that can be reviewed and deployed. Others prefer the Site Editor for speed. Choose deliberately, and document which approach the site uses.

Setting up a child theme

The general steps for a classic theme are:

  1. Create a new folder in wp-content/themes, named clearly after the parent.
  2. Add a style.css with the required header, including the parent theme's folder name on the Template line.
  3. Add a functions.php that enqueues the parent and child stylesheets, following the method your parent theme's documentation recommends.
  4. Upload the folder and activate the child theme under Appearance, Themes.
  5. Check the site looks the same before making any changes.

Some parent themes ship with a ready-made child theme you can download. That is often the safest starting point, because the developer has already handled how styles load. For block themes, WordPress offers tools and plugins that can generate a child theme from the Site Editor; check the official WordPress documentation for current options.

Before activating, take a backup and ideally test on a staging copy. Activating a new theme can reset some widget or menu locations in classic themes. Our staging and testing guide explains how to try changes safely.

Overriding templates without trouble

When you copy a parent template into the child to change it, you take responsibility for keeping that copy current. If the parent theme later improves or fixes that template, your copy will not receive the change automatically.

To manage this:

  • Override as few files as possible. Prefer hooks and filters where the theme provides them.
  • Keep a note of every overridden file and why.
  • After parent theme updates, compare overridden files against the new parent versions.
  • For WooCommerce, check the system status screen, which can flag outdated template overrides.

Keeping it secure and maintainable

A child theme is code on your server, so treat it with the same care as any plugin.

  • Keep the parent theme updated. The child does not protect you from security issues in the parent.
  • Store the child theme in version control if your setup allows it.
  • Avoid pasting unvetted code snippets from forums.
  • Remove unused functions and old overrides.
  • Only use parent themes from reputable sources that are still maintained.

Our WordPress security guide covers wider steps, and the WordPress plugin audit guide helps you review the rest of your stack.

Child theme or custom plugin?

A useful test is to imagine switching to a different theme next year. Ask what should survive that change.

Type of changeBetter home
Template layout and stylingChild theme
Custom block styles tied to the designChild theme
Custom post types and taxonomiesCustom plugin
Shortcodes used inside contentCustom plugin
Tracking or integration codeCustom plugin or a reputable plugin

Shortcodes are a good example. If a shortcode lives in the theme and you change themes, every page using it will show raw shortcode text. Keeping it in a plugin avoids that.

Testing parent theme updates

Even with a child theme, parent updates can change markup, class names or hooks your child relies on. A simple routine helps:

  1. Read the parent theme's changelog before updating.
  2. Take a full backup.
  3. Apply the update on a staging copy first.
  4. Check key templates, menus, forms and any overridden files.
  5. Update the live site once you are happy, then check again.

Our backup and recovery guide explains how to make sure you can roll back if something goes wrong.

Signs your site needs this sorted

  • You avoid updating your theme because changes might be lost.
  • Nobody knows which theme files were edited.
  • A previous update already broke part of the design.
  • Custom code is scattered across the theme, plugins and snippet tools.

Any of these suggests it is worth a review before the next update. The fix is rarely dramatic: identify the changes, move each one to the right home, test on staging and then update with confidence. Once that is done, keeping the site current becomes routine rather than something everyone quietly avoids, and future developers can see at a glance where custom work lives.

FAQs

Will a child theme slow my site down?

A properly built child theme adds very little overhead, because it mostly reuses the parent's files. Speed problems usually come from heavy themes, plugins or images rather than the child theme itself.

Can I add a child theme to an existing site?

Yes. You can create and activate a child theme at any point. Test on staging first, because classic themes may need menus or widgets reassigned after switching.

What if my parent theme was edited directly?

Identify the changes, ideally by comparing the edited files with a fresh copy of the same theme version, then move them into a child theme or a custom plugin before updating the parent.

Do block themes still need child themes?

Not always. Many changes can be made in the Site Editor. A child block theme is useful when you want templates and settings stored as files that can be tracked and deployed.

Should custom functionality go in the child theme?

Only if it is genuinely part of the design. Features you would want to keep after changing theme, such as custom post types, usually belong in a plugin.

Can Prism Works Studio set up or clean up a child theme?

Yes. Prism Works Studio can audit theme changes, move customisations into a child theme or plugin and test updates as part of our website and ecommerce development work.

Free consultation

Let’s Talk About Growing Your Business Online.

Book a free, no-obligation 30-minute discovery call with one of our senior digital strategists.