How to create a child theme in WordPress is a question many beginners ask when they want to customize their site safely. A child theme lets you modify your website’s design or functionality without touching the original (parent) theme — so your changes don’t get wiped out after updates. This step-by-step guide will show you exactly how to set one up.

Table of Contents
⭐ What is a WordPress Child Theme?
A child theme is a WordPress theme that inherits the look and functionality of another theme (called the parent theme) and allows you to make changes safely.
Instead of modifying the parent theme directly, you make all changes in the child theme, ensuring your work remains intact even after the parent theme gets updated.
A child theme is a smart and future-proof way to personalize your WordPress website. Instead of editing your main theme directly — which risks losing everything during updates — learning how to create a child theme in WordPress allows you to safely override and extend the theme’s design or features. It’s especially helpful if you’re working with a popular theme like Astra, GeneratePress, or Hello Elementor, as these are frequently updated.
Knowing how to create a child theme in WordPress is a foundational skill for every blogger, designer, or small business owner who wants greater control over their site without hiring a developer.
🔥 Why Use a Child Theme?
✅ Keeps custom changes safe during theme updates
✅ Helps organize your custom code separately
✅ Ideal for learning and theme development
✅ Allows you to override templates, styles, and functions
Moreover, once you understand how to create a child theme in WordPress, you’ll have the flexibility to try out new layouts, scripts, or third-party integrations without fear. For example, you can add custom PHP snippets or modify WooCommerce templates in the child theme folder without breaking the parent theme functionality.
🛠️ Prerequisites Before You Begin
- A working WordPress website
- Access to your site’s file manager (via hosting cPanel or FTP like FileZilla)
- Basic understanding of code (HTML/CSS/PHP is a plus but not required)
Even if you’re new to WordPress, you don’t need to be a developer to learn how to create a child theme in WordPress. With just a few copy-paste steps and a bit of practice, you’ll be able to manage your own theme modifications like a pro.
📂 Step-by-Step Guide: How to Create a Child Theme in WordPress
🧩 Step 1: Create a New Folder for the Child Theme
- Go to your WordPress installation → wp-content/themes/
- Create a new folder and name it something like:
astra-child (if your parent theme is Astra
📄 Step 2: Create a style.css File

Inside the new folder, create a file named style.css and paste the following:
/*
Theme Name: Astra Child
Theme URI: https://yourwebsite.com/
Description: Child theme for Astra
Author: Your Name
Author URI: https://yourwebsite.com/
Template: astra
Version: 1.0.0
*/
/* Import parent theme styles */
@import url(“../astra/style.css”);
🔍 Replace “astra” in Template: with your parent theme folder name. This must match exactly.
⚙️ Step 3: Create a functions.php File
Create a new file in the same folder and name it functions.php. Paste the following code:
<?php
// Enqueue parent theme styles
function astra_child_enqueue_styles() {
wp_enqueue_style(‘astra-parent-style’, get_template_directory_uri() . ‘/style.css’);
}
add_action(‘wp_enqueue_scripts’, ‘astra_child_enqueue_styles’);
📌 Change ‘astra-parent-style’ and get_template_directory_uri() only if you are using a different theme.
If you’re wondering why this file is important — here’s the deal: WordPress uses
functions.php
to load scripts and styles. When learning how to create a child theme in WordPress, this is where you tell your theme to load the parent styles properly and optionally include your custom functions in the future.For example, you might later add features like custom post types, shortcodes, or script optimizations right here — all without touching your main theme’s files.
🎨 Step 4: Activate the Child Theme

- Log in to your WordPress dashboard
- Go to Appearance → Themes
- Find your newly created child theme and click Activate
✅ Optional: Copy and Modify Template Files
Want to customize a template?
- Copy the file from the parent theme (like header.php)
- Paste it in the child theme folder
- Edit safely — your changes will override the parent file
💡 Tips for Working with Child Themes
Don’t remove the Template: line in style.css, or WordPress won’t recognize it as a child theme
Avoid too many customizations in child themes unless you know PHP
Use child themes with popular frameworks like Astra, GeneratePress, or Hello Elementor.
FAQs About Child Themes in WordPress
What happens if I update the parent theme?
Your customizations in the child theme remain safe. Only the parent theme gets updated.
Can I use a plugin to create a child theme?
Yes! Plugins like Child Theme Configurator make it easy with a visual interface.
Do I need to code to create a child theme?
Minimal coding is needed. You can copy and paste the code from this tutorial to get started.
How to create a child theme in WordPress without coding?
You can use free plugins like Child Theme Configurator if you’re not comfortable with code. But understanding how to create a child theme in WordPress manually gives you better control and flexibility in the long run.
Is it necessary to create a child theme in WordPress for small changes?
If you’re only using the theme’s customization panel (like colors or fonts), you don’t need a child theme. But for modifying templates, functions, or styles, knowing how to create a child theme in WordPress is essential.
Can I create a child theme for any WordPress theme?
Yes, you can create a child theme for almost any WordPress theme — including popular ones like Astra, GeneratePress, OceanWP, or even default themes like Twenty Twenty-Four. Just make sure you follow the correct folder name in the Template:
field.
What files are required to create a child theme in WordPress?
To learn how to create a child theme in WordPress, start with two files:style.css
: For metadata and custom stylesfunctions.php
: To enqueue parent theme styles
You can then add template files as needed.
How do I update the parent theme after using a child theme?
You can update the parent theme normally from the WordPress dashboard. Your child theme will remain intact — that’s the primary benefit of knowing how to create a child theme in WordPress.
🧠 Key Takeaways: How to Create a Child Theme in WordPress
- A child theme helps you safely customize your WordPress site without modifying the core theme.
- You must create a
style.css
andfunctions.php
file to start building a child theme. - Always include the correct parent theme name in the
Template:
section. - Once you understand how to create a child theme in WordPress, you can safely override templates and functions.
- Activating your child theme through the dashboard makes it live without losing your original design.
📌 Conclusion
Learning how to create a child theme in WordPress is one of the smartest steps you can take toward becoming a confident site owner or freelance developer. You protect your hard work from being overwritten by theme updates, and you get the freedom to customize almost anything — safely and cleanly.
Whether you’re planning to adjust page layouts, improve performance, or add unique styling, creating a child theme is your safest bet.
If you enjoyed how to create a child theme in WordPress, please visit my other tutorial “10 Best Free WordPress Themes for Beginners in 2025“
🚀 Ready to Level Up Your WordPress Skills?
Now that you know how to create a child theme in WordPress, why stop here?
✅ Explore our WordPress website creation tutorials → How to Start a WordPress Website in 9 Easy Steps – Step-by-Step Guide for Beginners
✅ Download our free Child Theme Checklist PDF → DOWNLOAD PDF
⚠️ Disclaimer
This tutorial is for educational purposes. Always backup your site before making code-level changes.