Websites and Tech

Child Theme

A small theme holding only your overrides, inheriting the rest from a parent theme so customisations survive parent updates.

Quick facts: Child Theme

Category
Websites and Tech
Level
Intermediate
Affects
Update safety, maintainability, design customisation
Where to see it
WordPress Appearance screen, hosting file manager, code editor
In this article4
  1. How a child theme works
  2. Why a child theme matters
  3. Common mistakes with child themes
  4. Getting it right

How a child theme works

A child theme is a small folder that declares another installed theme as its parent. It contains only what you have changed: a stylesheet, perhaps a template file or two, perhaps a functions file. Everything you have not changed is taken from the parent, so the child does not need a copy of the whole design.

When a page loads, the system looks in the child folder first. If a template exists there, it is used. If not, the parent’s version is used instead. That fallback is the entire mechanism, and it is why a child theme is not a duplicate: it is a thin layer of overrides sitting on top of code somebody else maintains.

Why a child theme matters

Themes get updated, and an update replaces the theme’s files. If you edited those files directly, your work is gone — the header you customised, the footer text you corrected, the stylesheet tweak that fixed a layout. Sites are usually broken this way at the worst moment, when someone finally applies a security update that has been deferred for months.

A child theme removes that conflict. Updates to the parent land normally, your overrides sit outside them, and you can keep the site patched without weighing security against design. It also gives you a clear record of what was customised, which matters when a different developer picks the site up later and needs to know which behaviour is yours and which came in the box.

Common mistakes with child themes

The first is copying the entire parent theme into the child. That defeats the point: those copied files stop receiving updates and you are back where you started, but with the bug now harder to find. Copy only the template you genuinely need to change.

The second is loading the parent’s stylesheet incorrectly, which produces an unstyled site and a panicked rollback. The third is putting functionality in the child theme when it should be in a plugin. A tracking snippet, a custom post type or a form handler belongs in a plugin, because it should keep working after a redesign; only presentation belongs in the theme layer. The last is a child theme built and then never audited, so it still overrides templates that the parent has since rewritten.

Getting it right

Create the child theme before the first customisation, not after. Override only the files you must, note what each override does, and re-check them whenever the parent has a significant release, because an override of a template the parent has since restructured can silently reintroduce an old bug.

If a theme is fully block-based, much of what a child theme used to do can now be handled through the site editor and saved in the database instead, so a child theme is only worth creating when you need to change code. And if the site depends on custom behaviour rather than custom styling, move that behaviour into a plugin as part of any WordPress development work so it survives the next redesign.

Do and do not

Do

  • Create the child theme before making any code change
  • Override only the template files you actually edit
  • Re-check overrides after a major parent theme release

Do not

  • Copy the whole parent theme into the child
  • Put tracking, forms or post types in the theme
  • Delete or stop updating the parent theme

Questions people ask about this

Do I need a child theme if I never edit code?

Probably not. If your changes are limited to colours, fonts, menus, widgets and settings offered by the theme itself, those live in the database and updates leave them alone. A child theme is for edits to template files or the stylesheet. Creating one you never use adds a layer with no benefit.

Does a child theme slow my site down?

Not in any way a visitor would notice. The extra work is a lookup for each template file and one additional stylesheet request, which caching handles easily. What does slow a site is a child theme stuffed with copied parent files and scripts. Keep it to what you actually changed.

What happens if I delete the parent theme?

The site breaks, because the child holds only your overrides and relies on the parent for everything else. The parent must stay installed, even though it is never activated directly. It still needs updating too, since its code is what actually runs on most of your pages.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.