A WordPress child theme is a small theme that sits on top of your main theme and holds your changes. Because of that, you can update the main theme without losing your edits. This guide shows when you need one and how to build one in seven steps. It also covers the problems that show up most often.
If you only change colors in the theme settings, you may not need any of this. However, once you edit CSS files or PHP templates, a child theme becomes the safe place for that work. Read on to see where the line sits.

What a WordPress child theme does
A WordPress child theme inherits everything from its parent theme. That includes the design, the templates and the features. Then it lets you override only the parts you want to change. According to the official WordPress child theme documentation, you can modify a theme this way without editing the parent theme’s code.
Here is why that matters. When a theme updates, WordPress replaces the whole theme folder. As a result, any edit made inside the parent folder disappears. A WordPress child theme lives in its own folder, so the update never touches it.
What a WordPress child theme gives you
- Your changes stay separate from the parent theme’s files.
- The parent theme can update, so you still get fixes and new features.
- You write only the code you need, which saves time.
- Your changes are easy to copy to another site or hand to a developer.
Do you need a WordPress child theme?
Not every site needs one. The answer depends on what you plan to change. First, look at the kind of edit, then pick the matching tool.
You need one when
- Template files such as the header, footer or single post layout need changes.
- You add PHP functions or hooks to the theme.
- A large amount of custom CSS belongs to this theme only.
You can skip it when
- Theme options, colors and fonts in the Customizer cover all your changes.
- A few lines of CSS fit in the Additional CSS box.
- Small code snippets work well with a snippets plugin.
Small CSS tweaks are fine in the Additional CSS box, because WordPress stores them in the database. Larger projects are different. For example, once you override templates and add functions, a child theme is the cleaner choice. If you are unsure, think about future changes. Would you want the edit to stay if you switched themes? If yes, a small plugin fits better. If it belongs to this design, use a child theme.
How to create a WordPress child theme in 7 steps
You can build a WordPress child theme by hand in a few minutes. You only need access to your site files and a text editor. Before you start, make a backup so you can restore the site if something goes wrong.

Step 1: Back up your site
Save a full copy of your files and database. In addition, note which theme version you run today. A backup costs almost nothing, and it removes most of the risk from the steps below.
Step 2: Create the child theme folder
Open the wp-content/themes folder. Then add a new folder next to the parent theme. Use lowercase letters and hyphens, for example mytheme-child. The name is yours to choose, but keep it simple.
Step 3: Add a style.css file
The style.css file is the only file a child theme must have. At the top, add a comment block with the header fields. The most important lines are Theme Name and Template. Theme Name is what you see in the admin screen. Template tells WordPress which theme is the parent.
The Template value must match the parent theme’s folder name exactly. For instance, if the parent folder is called mytheme, the Template line must say mytheme. A single wrong letter stops the child theme from working.
Step 4: Load the stylesheets
Some parent themes load the child stylesheet for you. Others do not. Therefore, check how your parent theme enqueues its styles. If the child stylesheet does not load, add a functions.php file and enqueue it with the standard WordPress function. Use the right path functions so the file loads from the child folder.
Block themes often need less here. They handle many styles through the theme.json file, so you may not need to enqueue anything. Always test the front end to be sure.
Step 5: Add your custom code
Now place your changes in the child theme. To override a template, copy the file from the parent into the child folder and keep the same file name. WordPress will then use your copy. Next, edit only the lines you need.
The functions.php file works differently. It does not replace the parent file. Instead, WordPress loads both, and the child file loads first. So add only your own new functions there. Never copy the whole parent functions.php, because duplicate function names cause fatal errors.
Step 6: Test on a staging copy
Before you touch the live site, test the child theme on a staging copy. Upload the folder, activate it, and look at your main pages. Check the menu, the forms, the mobile layout and any page that uses a template you changed. If you run a store, test the cart and checkout as well.
Step 7: Activate it on the live site
When everything works, go to Appearance, Themes and activate the child theme. Then review the Customizer. Some settings are saved per theme, so you may need to check colors, menus and widgets once more. Finally, clear any cache and view the site on a phone.
Keep your changes safe when the parent updates
A WordPress child theme protects your files, but updates still deserve care. A parent theme can change a template that you copied. In that case, your old copy may no longer match the new design. So compare your overrides with the new parent files after each major update.
Follow the same routine every time. First, back up. Next, update on staging. Then compare the templates you overrode. Finally, push the update live. Our guide to safe theme update steps walks through this process in detail.
Common WordPress child theme problems and fixes
Most issues come from a small mistake in the setup. Here are the common ones, together with the usual fix.
- The site breaks after activation. Check the Template line in style.css. It must match the parent folder name exactly.
- Your styles do not appear. The child stylesheet may not be loading. Enqueue it, then clear the cache.
- A fatal error appears. You may have copied parent functions into the child file. Remove the duplicates.
- Your template edits are ignored. Make sure the file name and folder path match the parent file exactly.
- The layout changed after an update. The parent may have changed the template you copied. Compare the two files and merge the new parts.
When a child theme stops being the right tool
The WordPress documentation warns that heavy changes inside a child theme can become a headache to manage. If you override most of the templates, you are close to a new design. At that point, ask whether a custom build would be simpler. Our comparison of customizing an existing theme or building a custom one helps you decide.
When to hand the work to a developer
You can build a simple child theme yourself. However, some jobs are better left to someone who does this daily. Consider help when you need new page sections, a changed header layout, or edits to a store theme. A mistake on a live shop costs real orders.
Agratri offers a theme customization service. The service page states that every change goes into a child theme, so updates stay safe. It also says speed is checked throughout. You send the theme and your brand assets, then receive one price and one timeline before work begins. If your project needs something truly unusual, the theme development service may fit better.
Frequently asked questions
What is a WordPress child theme?
It is a theme that depends on a parent theme. It inherits the design and features, and it stores your own changes in a separate folder.
Do I need a WordPress child theme for custom CSS?
Not always. A few lines fit in the Additional CSS box. A large stylesheet that belongs to one theme is easier to manage in a child theme.
Will a WordPress child theme slow my site down?
It adds very little. A child theme only loads the files you add, and a small stylesheet is cheap. Keep your code short and clean, and the effect stays small.
Can I use a child theme with a block theme?
Yes. Block themes support child themes too. You can override templates, parts and patterns by adding files with the same names, and you often need less style setup.
What happens to my changes if I update the parent theme?
Your files stay in place. Still, check any template you copied, because the parent version may have changed.
Next step
A WordPress child theme is the safest way to change a theme you plan to keep updating. Start with a backup, build the child theme, and test it on a staging copy. If you would rather skip the code, contact Agratri and describe the changes you want.