cloud WordPress

How to set up child themes on WordPress

beginner 8 min read Updated 2026-03-18
Quick Answer

A child theme is a WordPress theme that inherits functionality from a parent theme, allowing you to make customizations without losing changes when the parent theme updates. Setting up a child theme involves creating a new folder in your themes directory with a style.css file and functions.php file.

Prerequisites

  • Active WordPress installation
  • Access to WordPress admin dashboard
  • Basic understanding of themes
  • File manager or FTP access (optional)

Step-by-Step Instructions

1

Access your WordPress themes directory

Navigate to your WordPress installation directory and locate the /wp-content/themes/ folder. You can access this through your hosting control panel's File Manager, FTP client, or WordPress admin dashboard using Appearance > Theme Editor (though file manager is recommended for safety).
Always backup your site before making theme modifications
2

Create a new child theme folder

In the /wp-content/themes/ directory, create a new folder for your child theme. Name it using your parent theme's name followed by -child. For example, if your parent theme is Twenty Twenty-Four, name the folder twentytwentyfour-child.
Use lowercase letters and hyphens instead of spaces for folder names
3

Create the style.css file

Inside your child theme folder, create a new file called style.css. Add the following header information at the top:
/*
Theme Name: Twenty Twenty-Four Child
Description: Child theme of Twenty Twenty-Four
Template: twentytwentyfour
Version: 1.0
*/

Replace the theme names and template value with your actual parent theme information. The Template value must exactly match your parent theme's folder name.
The Template line is crucial - it tells WordPress which parent theme to inherit from
4

Create the functions.php file

Create a functions.php file in your child theme folder and add the following code to properly enqueue the parent theme's stylesheet:
function child_theme_enqueue_styles() {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
}
add_action('wp_enqueue_scripts', 'child_theme_enqueue_styles');
Never add closing PHP tags (?>) at the end of functions.php files
5

Activate your child theme

Go to your WordPress admin dashboard and navigate to Appearance > Themes. You should see your new child theme listed alongside other installed themes. Click the Activate button on your child theme to make it active on your site.
Your site should look identical to the parent theme after activation
6

Verify the child theme is working

Visit your website's frontend to ensure it displays correctly. In your admin dashboard, go to Appearance > Themes and confirm your child theme is listed as Active. You can also check Appearance > Theme Editor to see your child theme files.
If something looks broken, you can quickly switch back to the parent theme
7

Start customizing your child theme

You can now safely add custom CSS to your child theme's style.css file or add custom functions to functions.php. To override parent theme template files, copy them from the parent theme folder to your child theme folder and modify as needed.
Only copy template files you actually need to modify to keep your child theme lightweight

Common Issues & Troubleshooting

Child theme not appearing in Appearance > Themes

Check that your style.css file has the correct header format and is saved in the proper child theme folder. Ensure the folder is located in /wp-content/themes/.

Site looks broken after activating child theme

Verify your functions.php file properly enqueues the parent stylesheet. Check that the Template value in style.css exactly matches your parent theme's folder name.

Parent theme styles not loading

Ensure your functions.php file uses wp_enqueue_style() to load the parent theme's CSS. Check for any PHP syntax errors that might prevent the file from executing properly.

Changes not appearing on frontend

Clear any caching plugins or browser cache. Verify you're editing files in the child theme folder, not the parent theme. Check that your child theme is actually activated in Appearance > Themes.

Prices mentioned in this guide are pulled from current plan data and may change. Always verify on the official WordPress website before purchasing.