Guide

How to Create a WordPress Child Theme (2026)

Create a WordPress child theme to customize safely. Step-by-step guide for creating child theme files, enqueueing styles, and overriding parent templates.

How to Create a WordPress Child Theme

A child theme inherits all of its parent theme's functionality and design, while allowing you to override specific files and add custom CSS/PHP without touching the parent theme. This means your customizations survive parent theme updates.

Why Child Themes Matter

If you edit a theme's files directly and the theme updates, your changes are overwritten. A child theme separates your customizations from the parent theme — updates to the parent don't touch your child theme files.

Step 1: Create the Child Theme Directory

In your WordPress installation, navigate to wp-content/themes/. Create a new folder named after your parent theme with "-child" appended, e.g., twentytwentyfour-child.

Step 2: Create style.css

Inside your new folder, create style.css with this header:

/*
Theme Name: Twenty Twenty-Four Child
Template: twentytwentyfour
*/

The Template line must exactly match the parent theme's directory name (check wp-content/themes/ for the exact name).

Step 3: Create functions.php

Create functions.php in your child theme directory to enqueue parent and child styles:

<?php
add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_styles' );
function child_theme_enqueue_styles() {
    wp_enqueue_style(
        'parent-style',
        get_template_directory_uri() . '/style.css'
    );
}

Step 4: Activate the Child Theme

Go to Appearance → Themes in WordPress admin. Your child theme appears as a separate theme. Click Activate.

Overriding Parent Templates

To override a parent template, copy the file from the parent theme directory into your child theme with the same path. WordPress uses the child theme's version first. Common overrides: header.php, footer.php, functions.php, and page templates.

Using WP-CLI on SiteICO

On SiteICO, you can create a child theme via the terminal:

wp scaffold child-theme my-child-theme --parent_theme=twentytwentyfour

Start building with SiteICO

Deploy your WordPress site in under 1 second. Follow our guides to get the most out of the platform.

No credit card required.