◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Theme → Create a Child Theme
How to create a child theme in WordPress
Want to customize your WordPress theme without risking updates wiping out your changes? A child theme is the safest way to modify a theme while keeping everything updatable and organized.
Let’s walk through what child themes are, why they matter, and how to create one—either by hand or with beginner-friendly plugins.
What is a child theme in WordPress?
A child theme is a theme that inherits everything from another theme, called the parent theme. It acts like a skin on top of your original theme. You can change styles, layouts, or even functions in your child theme without ever touching the original files.
When WordPress loads your site, it pulls most of its design and code from the parent theme, but any changes in the child theme take priority. This setup lets you personalize the design while still allowing the parent theme to update safely.
Why use a child theme instead of editing the main theme?
Child themes are the go-to method for customizing any WordPress theme long-term, because:
- You won’t lose customizations when the parent theme updates.
- You can easily reverse changes by modifying or removing child theme files.
- You keep your edits organized, especially helpful when troubleshooting or handing off the site to someone else.
- You can test safely without breaking the base theme.
What you need before creating a child theme
To follow along, make sure you have:
- A working WordPress site with a theme already installed (your parent theme)
- Access to your site’s files, either through:
- A basic understanding of how files and folders work
- Optional: a text editor like VS Code, Sublime Text, or Notepad++
Let’s go over both the manual and plugin-based methods.
Method 1: How to create a child theme manually (step-by-step)
1. Create a new child theme folder
Go to your theme directory:
/wp-content/themes/Create a new folder. Use the parent theme’s name and add -child. For example:
twentytwentyfour-child
2. Add a style.css file
Inside your new folder, create a file called style.css. Add the following to the top of the file:
/* Theme Name: Twenty Twenty-Four Child Theme URI: https://example.com/ Description: A child theme for the Twenty Twenty-Four theme Author: Your Name Author URI: https://yourwebsite.com Template: twentytwentyfour Version: 1.0.0 */ /* Custom styles go below this line */Important:
- Theme Name is what shows in your dashboard.
- Template must exactly match the folder name of the parent theme.
- Don’t forget the opening /* and closing */.
3. Add a functions.php file
In the same folder, create a functions.php file. Add the following code to load the parent theme’s stylesheet:
<?php add_action( 'wp_enqueue_scripts', 'my_child_theme_styles' ); function my_child_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); }This tells WordPress to use the parent theme’s main stylesheet before applying your custom styles.
4. (Optional) Add a screenshot
Add an image called screenshot.png to your child theme folder. This will show up in your WordPress dashboard under Appearance > Themes.
Recommended size: 1200×900 pixels
Method 2: Use a plugin to create a child theme
If you’re not comfortable editing files directly, you can create a child theme using a plugin—no coding required.
Option 1: Orbisius Child Theme Creator
Step-by-step:
- Install the plugin:
- Open the plugin:
- Go to Tools > Child Theme Creator
- Choose your parent theme from the dropdown.
- Enter a new name for your child theme.
- Click Create Child Theme
- Visit Appearance > Themes to activate your new child theme.
Option 2: WP Child Theme Generator
This plugin offers a slightly cleaner interface for generating basic child themes.
Step-by-step:
- Go to Plugins > Add New
- Search for WP Child Theme Generator
- Click Install Now, then Activate
- Open Tools > Child Theme Gen
- Choose the parent theme and fill out the fields:
- Theme Name
- Description
- Author info (optional)
- Click Create Child Theme
- Head to Appearance > Themes and activate it.
How to activate your child theme
Once your child theme is ready (manually or with a plugin):
- Go to Appearance > Themes
- Find your new child theme in the list
- Click Activate
Visit your site and confirm everything looks the same. If it looks broken, double-check the parent theme name in your style.css.
How to customize your child theme
To change the design
Edit your child theme’s style.css. For example:
body { background-color: #f4f4f4; }To change layout or functionality
You can override any file from the parent theme. Just copy it into your child theme folder and edit it.
For example:
- Copy /twentytwentyfour/header.php into /twentytwentyfour-child/header.php
- Change the HTML in the child theme version
To add new features
Add PHP code to your child theme’s functions.php. Examples:
// Add a new image size add_image_size( 'custom-size', 800, 600, true ); // Remove the admin bar for logged-in users add_filter( 'show_admin_bar', '__return_false' ); Best practices for working with child themes
Once your child theme is up and running, a few habits can help you keep things stable, organized, and easy to manage. These best practices will also save you time and stress in the long run.
- Always keep your parent theme updated. Updates often include security patches, bug fixes, and compatibility improvements—none of which will break your child theme as long as you’re not overriding the updated files directly.
- Don’t remove essential WordPress functions unless you know what they do. WordPress themes rely on a number of core functions to work properly (like wp_head() and get_header()). Removing or altering them can lead to broken layouts or unexpected bugs.
- Document your changes, especially in functions.php. Leave comments explaining what each function or customization does. This is incredibly helpful if you come back months later, or if someone else needs to take over your site.
- Test your child theme on a staging site before pushing it live. A staging environment lets you experiment safely without affecting your live site, so you can catch errors, layout issues, or plugin conflicts ahead of time.
- Stick to copying only the templates you need to change. Don’t copy all parent theme files into your child theme folder. Only copy what you plan to edit, so your child theme stays lightweight and continues to benefit from parent theme updates.
- Use version control if you’re making frequent changes. Git or another version control system lets you track edits over time, roll back changes if something breaks, and collaborate cleanly with others.
- Regularly back up your site before making major edits. Backups ensure you can restore your site quickly if a customization goes wrong or a plugin conflict causes a crash.
Troubleshooting common child theme issues
Things don’t always go according to plan …
- Styles not showing up? Check if functions.php is loading the parent stylesheet correctly.
- White screen or errors? Check your syntax in functions.php. One typo can break the site.
- Child theme not appearing? Make sure the Template: name in style.css exactly matches the parent theme’s folder name.
Enable debugging if needed by adding this to your wp-config.php:
define( ‘WP_DEBUG’, true );
Getting started with WordPress child themes
Creating a WordPress child theme gives you the flexibility to safely tweak your site’s design or functionality without interfering with your theme’s core code. Whether you prefer coding manually or using a plugin, child themes offer a future-proof way to customize your site.
If you’re just getting started, try using one of the recommended plugins to generate your first child theme. Once you’re comfortable, move on to editing styles, templates, or functions for even more control.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
How to change WordPress themes the right way and avoid potential problems→
We’ll go over some reasons why you may want to switch to a new theme and how to prepare your website. Then, we’ll show you a few ways to change your WordPress theme.
WordPress minimalist themes: 10 cleanest designs →
Discover the best minimalist WordPress themes for clean, fast-loading, and distraction-free website designs.
Best free WordPress themes ranked by real performance→
We’ll show you how pairing the right theme with high-performance WordPress hosting – like the plans offered by Liquid Web – can transform your site into a speed machine!