A WordPress child theme lets you customize a theme so that updates to the parent theme do not overwrite your changes. If you have ever edited a theme directly and lost everything on the next update, this is the fix. Here is what a child theme is, why it matters, and how to generate the files in seconds.
Why use a WordPress child theme
When you edit a parent theme’s files directly, the next theme update wipes out your work. A child theme solves this by living in its own folder and inheriting everything from the parent. Your tweaks sit safely apart, so you can update the parent whenever you like.
A child theme is the right place for:
- Safe CSS changes: override styles without touching the parent.
- Template edits: copy a parent template into the child and modify it.
- Custom functions: add code to
functions.phpthat survives updates.
What a child theme needs
A working child theme is surprisingly small. It requires just two files in a new folder:
- style.css: its header must include a
Template:line that names the parent theme’s folder slug. This is how WordPress links the child to the parent. - functions.php: this enqueues the parent stylesheet first, then the child stylesheet, so your overrides load last and win.
Getting that header and the enqueue order exactly right is where most people slip up, which is why generating the files beats writing them by hand.
Generate your child theme files
The WordPress Child Theme Generator builds both files for you. Just follow these steps:
- Open the WordPress Child Theme Generator and enter your parent theme name.
- Copy the generated
style.css, including the header with the correctTemplate:slug. - Copy the generated
functions.phpthat enqueues the parent and then the child styles. - Create a new folder in
wp-content/themes/, drop both files inside, and upload it. - Go to Appearance > Themes in your dashboard and activate the child theme.
Everything runs entirely in your browser. Nothing you type is sent to a server, so your theme details stay on your device.
Related tools
- WordPress Snippet Generator: write the custom code that goes into your child theme’s
functions.php. - WordPress Roles & Capabilities: reference for permission checks when adding functions to a child theme.
- WordPress Hook Finder: find the right action or filter to hook your customizations onto.
Stop editing parent themes and losing your work. Generate a child theme, activate it, and customize with confidence.