Want to customize your WordPress site without worrying about updates breaking everything? Then it’s time to learn how to create a child theme in WordPress – the safe, update-proof way to make changes.
A child theme lets you adjust styles, add functions, or edit templates without touching your original theme files. That means your customizations stay intact, no matter how often your parent theme gets updated. In this guide, we’ll see how to create a WordPress child theme step by step, what to do if you already made changes without a child theme, and more.
What are WordPress child themes?
One of the most common frustrations WordPress users face is adding custom CSS or editing theme’s files, only to have everything disappear after a theme update. A child theme is designed to prevent exactly that.
Instead of editing the original (or parent) theme directly, with a WordPress child theme you can make changes safely. Your customizations live in their own folder, separate from the main theme. So even when your parent theme is updated, your edits stay intact.
- Parent theme: This is the main theme your site is built on. It provides all the base styles and functionality.
- Child theme: A theme that inherits the parent’s design and features but lets you safely customize things on top of it.
This is the recommended way to modify a WordPress theme. You might just want to update a few colors or create new layouts. This way your site is stable, updatable, and easier to manage.
Before you start: What you’ll need
Before creating your child theme, let’s make sure you’re set up for success with this quick checklist:
- Make sure your WordPress site is live and working
- You have admin access to install themes and upload files
- You know the name of your current theme (aka the parent theme)
- Bonus: You’ve backed up your site or created a staging version to test safely
Taking time to prepare these basics will make the rest of the process, especially the steps for how to create a child theme in WordPress, much smoother. If you already made changes using the Customizer, jump to this section to learn how to save and transfer your settings first.
Choose the right parent theme
Your child theme will inherit everything – styles, structure, and functionality – from its parent theme. So it’s worth choosing a solid one to build on. When selecting a parent theme, look for:
- Popularity & support: Well-maintained themes are more likely to be compatible.
- Customization options: The more flexible the theme, the more you can extend it.
- Performance: Speed matters, especially if you’re planning custom tweaks.
If you’re not sure about your theme, some WordPress child theme plugins (like Child Theme Configurator) include a built-in Analyze tool to check compatibility. You can also review the parent theme’s documentation for specific instructions.
How to create a child theme in WordPress manually
Creating a child theme manually gives you full control, and once you’ve done it once, you’ll see it’s not as scary as it sounds. Just follow these steps carefully, and you’ll have a working child theme in minutes.
1. Create a folder for your Child theme
First, open your WordPress directory and navigate to: wp-content/themes. Inside that folder, create a new folder for your child theme. Give it a simple, lowercase name with hyphens instead of spaces, for example: grand-sunrise. This will be your child theme’s home.
2. Create the style.css File
Inside your new folder, create a file named: style.css. At the top of this file, add the following code:
/* Theme Name: Grand Sunrise Template: twentytwentyone */
- Theme Name is your WordPress child theme’s name (can be anything)
- Template must exactly match the folder name of your parent theme
This header tells WordPress which parent theme your child theme is based on. If the name is incorrect, WordPress won’t know what to inherit, and your theme won’t work.
Below that, you can add your own CSS rules. For example:
body { font-family: "Open Sans", sans-serif; }
3. Create the functions.php file
Now, in the same folder, create a file named: functions.php. Add the following PHP code to it:
<?php function my_child_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'my_child_theme_styles' );
What this code does:
- wp_enqueue_style(): Safely loads a stylesheet
- get_template_directory_uri(): Gets the URL of the parent theme
- get_stylesheet_uri(): Gets the URL of the child theme’s style.css
- array(‘parent-style’): Ensures the child styles load after the parent’s
Important: If you skip this step, your child theme might load without any styles. WordPress doesn’t automatically inherit styles, you have to enqueue (load) them. Enqueue is WordPress’s official method for adding styles/scripts to your site safely.
Tip: Avoid using @import in your style.css. It’s outdated and can slow down your site.
4. Activate your child theme
Once your WordPress child theme files are in place, you need to activate them before you can make any changes. For that,
- Log into your WordPress dashboard,
- Go to Appearance > Themes,
- You’ll see your child theme listed alongside other installed themes,
- Hover over it and click Activate, and that’s it, your child theme is now active!
If you see your site working as expected, your child theme is set up correctly and loading styles from the parent theme. If something looks off, like missing styles or layout issues, double-check that your functions.php is properly enqueueing the parent stylesheet.
What you can customize with a WordPress child theme
Now that your child theme is active, you’re probably asking what exactly you can do with it. It can be small changes like adjusting the colors, or even adding some bit features. If you’ve followed the steps for how to create a child theme in WordPress, here are the most common ways you can start customizing.
1. Adjust fonts, colors, and layout (CSS)
Let’s say you want to change the font size on blog posts, adjust the spacing between elements, or customize link colors or button hover states. You can do all that directly in your WordPress child theme’s style.css. Example:
/* Make blog post text larger */ .single-post p { font-size: 18px; line-height: 1.7; } /* Change link hover color */ a:hover { color: #ff5e5e; }
2. Override template files (like footer.php)
If you want to remove a theme credit in the footer, add an extra widget area, rearrange post metadata, just copy the file from the parent theme into your child theme folder and edit it.
- Find footer.php in the parent theme
- Copy it to your child theme folder
- Edit your new version, WordPress will use it instead of the original
Keep the folder structure identical. If the file is in a subfolder, mirror that in the child theme.
3. Add custom functions (without breaking anything)
Your child theme’s functions.php is the perfect place to add new features without relying on plugins. Examples:
- Add support for featured images:
add_theme_support( 'post-thumbnails' );
- Remove the WordPress version number from your site’s source code:
remove_action('wp_head', 'wp_generator');
- Register a new widget area:
function my_custom_sidebar() { register_sidebar(array( 'name' => 'Custom Sidebar', 'id' => 'custom_sidebar', 'before_widget' => '<div>', 'after_widget' => '</div>', )); } add_action('widgets_init', 'my_custom_sidebar');
4. Customize block themes with theme.json
If you’re using a block theme like Twenty Twenty-Three, styles are controlled by a file called theme.json instead of just CSS. To override it:
- Copy the parent theme’s theme.json file into your child theme folder
- Edit your version (JSON syntax required)
Example snippet (This lets you control spacing, fonts, and color palettes across your site—all in one file.):
"typography": { "fontSize": "18px", "lineHeight": "1.6" }
What if you already customized your theme without a child theme?
If you’ve already made changes to your WordPress theme without using a child theme, you’re in good company. A lot of people do this early on. You can still move those changes safely into a child theme. This section walks you through how to do that, step by step.
1. Figure out what you changed
Start by listing out where and how you made customizations. Did you:
- Change styles in Appearance > Customize?
- Add CSS under Additional CSS?
- Edit files like style.css, footer.php, or functions.php in the theme editor?
- Use a plugin that injected code into your active theme?
This helps you understand what to keep, what to copy, and what to double-check. This process is especially important if you’ve already made changes and now want to switch safely, without losing your work or starting over. It pairs well with learning how to create a child theme in WordPress, even if you didn’t begin with one.
2. Export your Customizer settings (if you used them)
Customizer changes won’t carry over automatically. That includes colors, fonts, header layout, and homepage settings. To preserve them, you can export and re-import:
- Install the Customizer Export/Import plugin
- Go to Appearance > Customize
- Click Export to save your settings
- After switching to your child theme, go back and Import them
This step protects all your visual settings.
3. Move any custom CSS to the right place
If you wrote CSS directly in the parent theme’s style.css or inside the Customizer, copy that code into your WordPress child theme’s style.css. This keeps your design changes safe during future updates. Don’t keep editing the parent theme, it’ll reset when it updates.
4. Copy over template or PHP file edits
If you modified PHP files (like single.php or header.php), here’s what to do:
- Open your parent theme folder
- Find the file you changed
- Copy it into your child theme folder (use the exact same structure)
- Make sure it includes your edits
For example:
Parent: /twentytwentyone/footer.php Child: /your-child-theme/footer.php
5. Test on a staging site (highly recommended)
Don’t risk anything breaking. Test your new WordPress child theme setup on a staging site before going live. Hosting providers like 10Web offer one-click staging. Or, you can use tools like LocalWP to test changes on your own computer. This gives you a no-pressure way to spot issues before your visitors do.
Final tip: Don’t rush it
It’s normal to feel nervous about switching mid-way, but you’re doing the right thing. Moving your changes into a child theme makes your site more reliable and easier to update. Take it one step at a time, back up before switching, and trust the process.
Common problems (and how to fix them)
Even when you follow every step carefully, things can still go sideways. That’s normal, and fixable. Below are the most common child theme issues people run into, plus how to solve them fast.
1. My styles aren’t showing
What’s likely wrong: Your child theme is active, but your site looks unstyled or broken.
Fix it:
- Open your functions.php
- Make sure you’re enqueuing both the parent and child stylesheets
- Your code should look like this. Double-check for typos in function names or file paths:
function my_child_theme_enqueue_styles() { wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css'); wp_enqueue_style('child-style', get_stylesheet_uri(), array('parent-style')); } add_action('wp_enqueue_scripts', 'my_child_theme_enqueue_styles');
2. My header or footer disappeared
What’s likely wrong: You copied a template file (like header.php) into your WordPress child theme, but something’s missing.
Fix it:
- Compare the version in your child theme with the original in the parent
- Make sure nothing important was deleted or misplaced during the copy
- If you’re using a block theme, check whether your layout is controlled by theme.json or the Site Editor instead.
Keep in mind that block themes like Twenty Twenty-Three work differently. They don’t use header.php the same way classic themes do.
3. Customizer settings are gone
What’s likely wrong: Customizer settings don’t transfer automatically when you switch to a child theme.
Fix it:
- Use the Customizer Export/Import plugin
- Export your settings before switching
- Import them back in after activating the child theme
This only works if your parent and child theme support the same Customizer options.
4. Changes aren’t showing up
What’s likely wrong: You updated code or CSS, but nothing’s changing on the front end.
Fix it:
- Clear your browser cache
- If you’re using a caching plugin, purge the site cache
- Add a version number to your enqueued styles. This forces browsers to re-load the file, not rely on the cached version. Example:
wp_enqueue_style('child-style', get_stylesheet_uri(), array('parent-style'), '1.0');
5. I made a change and the site broke
What’s likely wrong: There’s a small syntax error in one of your files.
Fix it:
- Turn on debugging in your wp-config.php:
define( 'WP_DEBUG', true );
- Check the error message for the exact line and file
- Fix the typo or invalid code
- If you’re locked out of your dashboard, use FTP or File Manager in your hosting panel to revert the change
Tools and plugins that will help you
If you’re not comfortable editing theme files or just want to save time, there are a few tools that can help you create and manage child themes with confidence. We’ve already mentioned the Customizer Export/Import plugin and how it helps you avoid redoing all your visual settings. There are three more tools worth knowing. Let’s see how they work and what to watch out for.
These tools are especially useful if you want to skip the manual steps for how to create a child theme in WordPress but still end up with a stable, update-safe setup.
Child Theme Configurator (best for classic themes)
This plugin helps you create a WordPress child theme without touching code. It scans your parent theme for compatibility issues, lets you pick what to copy (styles, menus, templates), and generates all required files with one click. So, it can save you a lot of time and manual coding.
But watch out. Although it works with most classic themes, it doesn’t always explain why something breaks. If you edited files directly before using the plugin, you’ll still need to move those changes manually.
Create Block Theme (best for block themes)
If you’re using a block theme like Twenty Twenty-Three, this official plugin from WordPress helps you generate a child theme based on your current customizations. It exports changes from the Site Editor (including theme.json and templates), helps you save your design as a child theme, and keeps your block-based layout intact.
Keep in mind that it only works with block themes and its generated child themes can include a lot of files, so it’s best to clean them up afterward.
Online child theme generators (manual alternative)
If you are not the biggest fan of manual setups, you can opt for trusted child theme generators like WP Child Theme Generator or others.
You just fill out a short form with your:
- Parent theme name
- Child theme name
- Author, version, description (optional)
Then download a ready-to-use ZIP file you can upload via Appearance > Themes > Add New. This works well for classic themes, but still requires you to enqueue styles and test everything manually.
Final thoughts
If you’ve made it this far, you’re already doing something many WordPress users skip – you know how to create a child theme in WordPress and even some ways to customize your site the right way.
WordPress child themes might seem technical at first, but now you know exactly why it matters, when to use one, and how to do it safely. You can do it manually or with a plugin. The result’s the same: protected website updates. If something breaks, you know how to fix it. That’s progress.
If you need to review the steps again, jump back to the manual setup steps or common problems any time. Now go make your site your own, without the fear of updates wiping it all out.
Automate manual work with 10Web Managed WordPress Hosting and 10Web AI Website Builder. Optimize your WordPress website effortlessly.
Simplify WordPress with 10Web
FAQ
How do I create a child theme in WordPress? Why should I create a child theme in WordPress? Can I create a child theme after I’ve already customized my site? Will I lose my layout or settings when I switch to a child theme? What’s the difference between a child theme and a block theme? How do I create a child page in WordPress? Why aren’t my styles loading in the child theme? What happens if I mess something up in my child theme? Do I always need a child theme? How do I create a GeneratePress child theme?