A child theme is a separate theme that inherits all the styles and functionality of another theme, called the parent theme, while letting you make your own changes safely on top of it.
The main reason people use child themes is updates. If you edit a theme’s files directly and the theme author releases an update, your changes get wiped out. A child theme protects your customizations from that.
How It Works
A child theme only needs two things to function: a stylesheet with a special header pointing to its parent, and usually a small functions file. Everything else — templates, layouts, default styling — comes from the parent theme automatically.
You then add only the files you want to change. If you want to tweak the header, you add a header file. If you leave it out, WordPress just uses the parent theme’s version instead.
When You Should Use One
Child themes make the most sense when you’re customizing a theme you didn’t build yourself — especially a popular theme that receives regular updates. If you’re building a theme completely from scratch for one specific site, a child theme usually isn’t necessary.
Quick Tip
Never edit a parent theme’s files directly if you’re using a child theme setup — it defeats the purpose. Keep all your custom CSS, templates, and code changes inside the child theme instead.