Table of contents22
In 2019, I watched a client’s website lose three weeks of work in about forty seconds — the reason I now insist everyone learn to create WordPress child theme before customizing a single file. She ran a restaurant site her developer had customized directly inside the theme files — new fonts, a custom homepage layout, CSS fixes everywhere. Then she clicked one theme update, and every single change was overwritten. The fonts, the layout, the tweaks. Gone. I was the person she called, and I was the person who had to deliver the bad news: the work wasn’t broken. It was erased.
That phone call is why I never touch parent theme files anymore. After more than a decade of building and fixing WordPress sites, I still consider the child theme the single most important technique a site owner can learn. Here’s my promise: by the end of this guide, you’ll have a working child theme built from just two files, you’ll understand exactly what each file does, and you’ll know how to verify it’s working before you change a single line. This is for every beginner who’s ever been afraid to customize their site. Let’s get rid of that fear, step by step.
One worry to kill before we start: you do not need to know PHP to create WordPress child theme from scratch. You need to copy two small files, paste in a few lines I’m giving you, and upload a folder. If you can rename a file on your computer, you can do this. The hard part is not the code — it’s understanding why the two files exist, and that’s exactly what we’re covering first.

What You’ll Learn in This Guide
- Why theme updates keep erasing your changes (and how to stop it for good)
- What a child theme really is — explained in plain English, no jargon
- The honest check: do you actually need a child theme?
- The two files that make a child theme, explained line by line
- The exact five-step process to build yours in about ten minutes
- How to confirm it’s working in two minutes flat
- Four mistakes that break child themes — and the fixes for each
- Your first safe customization to try today
Ready? Let’s get started.
Why Theme Updates Keep Erasing Your Changes
Here’s the deal: every WordPress theme gets updated. Developers release updates to fix bugs, close security holes, and add features. Those updates are important — you should install them. But an update works by replacing the theme’s files on your server with brand-new versions.
Do you see the problem? If you changed anything inside those files — a color in the stylesheet, a tweak in a template, a line of code in functions.php — the update replaces your edited files with fresh, unedited ones. Your changes aren’t backed up, moved aside, or merged. They’re simply overwritten. That’s exactly what happened to my restaurant client, and it happens to thousands of site owners every month.
Most people respond to this in one of two ways, and both are wrong. The first group never updates their theme again, which leaves security holes open on their site — one of the most common theme mistakes that break sites. The second group updates and re-does all their customizations by hand every single time, which is exhausting and exactly as unreliable as it sounds. There’s a third option, and it’s the only one professionals use: put your changes somewhere the update can’t reach.
That “somewhere” is a child theme. Now let’s make sure you actually understand what it is before we build one.
What a Child Theme Is (Plain English, No Jargon)
Think of your main theme as a printed instruction manual, and a child theme as a sticky-note pad on top of it. You never scribble in the manual itself — because the publisher will send you a new edition and your scribbles will vanish. Instead, you write all your notes on the sticky notes. When the new edition arrives, you keep your notes. The manual gets replaced; your notes survive.
Technically, a child theme is a small theme that inherits everything — the design, the layout, the features — from a “parent” theme. It starts out looking exactly like the parent. The magic is in how WordPress treats files: when a file exists in both the child and the parent, WordPress always uses the child’s version. So to change your header, you copy header.php into the child theme and edit the copy. The parent’s original stays untouched, updates replace only parent files, and your edited copy keeps working.
And when you haven’t overridden a file? WordPress quietly falls back to the parent’s version. That’s why a fresh child theme with only two files still shows your complete website — it’s borrowing everything from the parent until you decide to change something. Which brings us to an honest question most tutorials skip.
The Honest Check: Do You Actually Need a Child Theme?
I’ll be straight with you: not everyone needs one. If all your customizations happen in the WordPress Customizer — the “Additional CSS” box, the color pickers, the site identity settings — those live in your database, not in theme files. Updates don’t touch them. The same goes for changes made with a page builder or the block editor: that content is stored in your posts and pages. If the Customizer or editor can do what you want, use them first. They’re simpler.
You genuinely need to create a WordPress child theme when you want to change things those tools can’t reach: editing PHP template files (like header.php, footer.php, or single.php), adding your own functions to functions.php, making extensive CSS changes you want stored in real files, or overriding the structure of the parent’s templates. That’s the dividing line. Database changes are safe already; file changes need a child theme.
If you’re setting up a brand-new site and want the whole process done cleanly, start by learning how to install a WordPress theme the right way, then build your child theme on top of that solid base. But if you’re here because you’ve already customized your theme files directly — or you’re planning to — keep reading. The next part is the foundation everything else rests on.
The Two Files You Need to Create WordPress Child Theme
A child theme needs exactly two files to exist. Not ten, not a whole folder of templates — two. Let me introduce them like people, because understanding what each one does is what turns this from a recipe into real knowledge.
File 1: style.css — the identity card
The style.css file is the file that tells WordPress “I am a theme, and here is my parent.” Its most important job is not styling at all — it’s the comment block at the top, called the header. Here’s what one looks like for a child theme of the Twenty Twenty-Five theme:
/*
Theme Name: Twenty Twenty-Five Child
Theme URI: https://example.com/twenty-twenty-five-child/
Description: My custom child theme for Twenty Twenty-Five
Author: Sarah Mitchell
Author URI: https://example.com
Template: twentytwentyfive
Version: 1.0.0
Text Domain: twentytwentyfive-child
*/
Now, line by line, in plain words. Theme Name is simply what you’ll see in your dashboard under Appearance, then Themes. Make it obvious — “Twenty Twenty-Five Child” tells future-you exactly what this is. Template is the critical one: it must be the exact folder name of your parent theme, letter for letter, with no spaces. This single line is the connection between child and parent. Get it wrong and WordPress won’t know which theme is the parent. Description, Author, and Version are just labels for humans — write whatever helps you. Text Domain matters only if you’re translating your theme; for a personal child theme, matching your folder name is a fine habit.
Everything below that header comment is ordinary CSS, and it’s where your style customizations will live. For now, you can leave it empty — the child inherits all of the parent’s styling automatically.
File 2: functions.php — the loader
The functions.php file has one job in a fresh child theme: tell WordPress to load the parent theme’s stylesheet. Without it, your child theme would have no styling at all — just bare, unstyled content. Here’s the standard code:
<?php
// Load the parent theme's stylesheet so the child inherits its design
add_action( 'wp_enqueue_scripts', 'my_child_theme_enqueue_styles' );
function my_child_theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
?>
What each line does, in plain words. The first line opens PHP — every functions.php file starts with it. The add_action line says “when WordPress is loading the page’s styles and scripts, run my custom function.” Think of it as booking an appointment: you’re telling WordPress exactly when to execute your code. The function itself calls wp_enqueue_style, which is WordPress’s official, safe way of adding a stylesheet to a page. get_template_directory_uri() is a helper that always points to the parent theme’s folder — not the child’s — so this line loads the parent’s style.css no matter where the themes are installed.
Here’s a detail beginners often miss: a child theme’s functions.php does not replace the parent’s functions.php — it loads in addition to it. Both run. That means you never copy the parent’s functions.php into your child theme (we’ll cover why that’s a mistake later). Your child functions.php is purely your own code, and WordPress is smart enough to run both files.
Two files, understood. Now the fun part: let’s actually build them.
Step by Step: How to Create WordPress Child Theme
Here’s the exact five-step process. I’ll walk you through it the manual way — when you create WordPress child theme files yourself instead of relying on a plugin, you’ll understand the system forever. (There are plugins that generate child themes in one click, and I’ll mention them at the end, but the manual way teaches you what’s actually happening.)
Step 1: Find your parent theme’s exact folder name
Before anything else, you need the parent theme’s folder name — the one that goes in the Template line. This is the single most common source of broken child themes, so get it right now. Connect to your site with an FTP client or your hosting file manager, open wp-content/themes/, and look at the folder of your active theme. It will be something like twentytwentyfive — all lowercase, no spaces. Write it down exactly as it appears. Capital letters, hyphens, and underscores all matter.
Bonus Tip: if you’re not comfortable with FTP yet, you can also find this by going to Appearance, then Themes in your dashboard, clicking your active theme, and checking the URL preview — but FTP is the reliable source of truth. Copy the name character by character.

Step 2: Create the child theme folder
Inside wp-content/themes/, create a new folder. Name it after the parent theme with -child added at the end — for example, twentytwentyfive-child. No spaces, no capital letters, no special characters. This naming is a convention, not a rule, but following it means anyone (including future-you) instantly recognizes what this folder is.
Step 3: Create style.css with the header
Inside your new child folder, create a file named exactly style.css and paste in the header from the previous section, adjusted for your theme. The only line you absolutely must customize is Template — it must match the folder name you wrote down in Step 1. Change the Theme Name to something clear like “Twenty Twenty-Five Child.” Save the file.
Take thirty seconds to double-check the Template line right now. I mean it. In my experience, nine out of ten “my child theme doesn’t work” problems trace back to a typo in this one line. A capital letter where the folder has lowercase, a missing hyphen — any of it breaks the parent-child connection.
Step 4: Create functions.php with the loader code
In the same child folder, create a file named exactly functions.php and paste in the loader code from the previous section. The function name (my_child_theme_enqueue_styles) can be anything unique — just avoid names the parent theme might already use. Save the file.
That’s it. Your child theme now exists: one folder, two files. You can do this next part with your heart beating normally — activating a fresh child theme is one of the safest operations in WordPress.
Step 5: Activate the child theme
Go to Appearance, then Themes in your WordPress dashboard. You’ll see your new child theme listed there — probably without a screenshot, which is fine and normal. Click Activate. Then visit your website. It should look exactly the same as before. That sameness is the proof everything worked: the child theme is active, borrowing everything from the parent, and ready for your changes.
Note: activating a child theme is treated as a theme switch, so your menus and widget placements may reset. This surprises people. It’s easy to fix — just go to Appearance, then Menus and re-assign your menu to its location, and check Appearance, then Widgets for anything that moved. Do this once, and it never bothers you again.
If you’d rather skip the manual file creation, plugins like Child Theme Configurator can generate a child theme for you in a few clicks. They do the same thing we just did — create the folder and the two files — so you lose nothing by using one. But now you know what those plugins are doing behind the curtain, which means you can fix things when they misbehave.
How to Confirm Your Child Theme Is Working
Don’t just trust that it worked — verify it. This two-minute check will save you from the most frustrating kind of bug: making changes to a child theme that isn’t actually active.
First, add a tiny, visible test change. Open your child theme’s style.css (Appearance, then Theme File Editor, making sure the child theme is selected in the dropdown) and add this at the bottom:
/* Test: if this works, the child theme is active */
body {
border-top: 6px solid #79B530;
}

Now visit your site in a private or incognito window (this avoids your browser’s cached version lying to you). If you see a green bar across the top of your site, your child theme is live and its stylesheet is loading. Congratulations — that’s the whole system working: WordPress loaded your child theme, your child loaded the parent’s styles, and your own CSS applied on top.
No green bar? Work backwards: check that the child theme is actually activated under Appearance, then Themes; confirm the Template line matches the parent folder name exactly; and make sure the file is named style.css, not style.css.txt (Windows sometimes hides file extensions — a classic gotcha). Fix, re-check, and you’ll find it.
Once the test works, delete those test lines from style.css. You now have a verified, working child theme. Before you start customizing for real, let me save you from the mistakes I see most often.
Four Mistakes That Break Child Themes (and the Fixes)
I learned every one of these the hard way, on live sites, usually at inconvenient hours. Learn them here instead.
Mistake 1: The Template name doesn’t match the parent folder
This is the number one child theme killer. Your style.css says Template: twentytwentyfive but the actual folder is twentytwenty-five, or there’s a capital letter hiding somewhere. WordPress then shows the dreaded “The parent theme is missing” error, or the child theme doesn’t appear at all. The fix: open wp-content/themes/ and copy the parent folder name character by character into the Template line. Never type it from memory.
Mistake 2: Loading the parent stylesheet twice
Old tutorials used to tell people to add an @import line at the top of the child’s style.css to pull in the parent’s styles — while also enqueueing it in functions.php. The result: the parent stylesheet loads twice, your site gets slower, and styles can behave strangely. The fix: use only the functions.php enqueue method shown in this guide. If you see an @import line for the parent stylesheet in your child’s style.css, delete it.
Mistake 3: Copying the parent’s entire functions.php
Some beginners copy the parent’s functions.php into the child theme “just to be safe.” This is dangerous: since WordPress loads both files, every function gets defined twice, and PHP throws a fatal error — your site goes white. The fix: your child’s functions.php should contain only your own code plus the style loader. Remember, child functions.php adds to the parent’s; it never replaces it.
Mistake 4: Editing the parent theme “just this once”
You have a child theme. Everything is safe. Then you’re in a hurry, and it’s faster to just tweak the parent’s header.php directly… and the next update wipes it. I’ve done this. The fix is discipline: make it a rule that parent theme files are read-only. Need to change header.php? Copy it into the child theme first, then edit the copy. The thirty extra seconds are always worth it.
Steer clear of these four and your child theme will serve you quietly for years. If you want a broader safety net for all your theme experiments, my guide on how to customize WordPress without breaking it pairs perfectly with what you’ve learned here.

Your First Safe Customization: Try This Today
Now that your child theme is verified, let’s put it to work with something small, safe, and satisfying. Open your child theme’s style.css and add a rule that changes your site’s link color:
/* My first child theme customization */
a {
color: #1a73e8;
}
a:hover {
color: #0d47a1;
}
Save, check your site in an incognito window, and watch every link change color. That tiny moment — seeing your code affect a live site with zero fear — is the whole point of this guide. Your change lives in the child theme, so the next parent update will leave it completely alone.
From here, the natural next step is CSS. Once you’re comfortable, a collection of ready-made CSS recipes gives you dozens of copy-paste customizations — colors, fonts, spacing, layouts — all of which belong in this same child style.css file, where updates can never touch them.
And here’s the beautiful part: when that parent theme update arrives next month, you’ll click “update” with a calm heart. Your customizations are on the sticky notes, not in the manual. The manual gets replaced. Your notes survive. That’s what you built today.
Frequently Asked Questions
Will a child theme slow down my website? No, not in any way you’d ever notice. The child theme adds one extra tiny stylesheet and one small PHP file. The performance impact is effectively zero — far less than a single unoptimized image. Don’t let performance worries stop you.
What happens to my child theme when the parent theme updates? Nothing bad — that’s the entire point. The update replaces only the parent theme’s files. Your child theme folder is a separate folder, so it’s untouched. Occasionally a major parent update changes something your child overrides (like renaming a template file), and then you’d update your override to match — but your code itself is never deleted.
Can I create a child theme of a child theme (a grandchild)? WordPress doesn’t support this — a child theme can only have one parent, and that parent should be a full theme. If you need deeper layering, you’re better off building a custom theme or restructuring your approach. In practice, one child level is all anyone ever needs.
Do I need a child theme if I use the block editor (Gutenberg)? For content and layout built in the editor, no — that lives in your database. You need a child theme when you want to change theme files: PHP templates, functions.php code, or extensive custom CSS in files. Many site owners happily use both: the editor for content, a child theme for code-level tweaks. My complete guide to the WordPress block editor shows what’s possible without touching any files at all.
I already customized my parent theme directly. Is it too late? It’s not too late, but act before the next update. Create your child theme now, then move your customizations over: copy each edited parent file into the child (keeping the same filename and folder structure) and restore the parent’s originals — you can get clean copies by re-downloading the theme. It’s a bit of careful work, but it converts a ticking time bomb into a safe setup.
Final Thoughts
You started this guide with the fear every site owner knows: the fear that one click — one innocent “update” button — could erase your work. Now you know exactly why that happens, and you’ve built the thing that prevents it: a child theme with two files, a verified test, and a clear understanding of what each part does. That’s not a small achievement. Most WordPress users never learn this, and they pay for it with every update.
Here’s my honest line: a child theme won’t make your site beautiful by itself. It’s plumbing, not paint. But it’s the plumbing that lets you paint freely for years without ever worrying about the next update washing it away. Congratulations — you now customize like a professional.
Did your test green bar appear on the first try, or did a typo in the Template line get you like it gets everyone? Tell me in the comments — I read every one, and your story might save the next reader an hour of head-scratching.










