How to Create a WordPress Child Theme

  • Post last modified:Last updated on September 30, 2026
  • Post author:By

A WordPress child theme inherits the style and functionality of a parent theme while keeping all your modifications separate. The big payoff: you can update the parent theme without losing any of your customizations.

In this tutorial we’ll show you two ways to create a child theme — manually with code, and with a plugin. (If you’d rather customize with code snippets instead of a whole theme, see our guide to adding custom CSS and JavaScript.)

How to Create a WordPress Child Theme

Method 1: Create a child theme manually

It only takes a few minutes. This example uses the default WordPress theme Twenty Twenty-One as the parent, but the process is the same for any theme.

Step 1: Create the child theme folder

Create a new folder inside wp-content/themes/ in your WordPress installation. This folder will hold all your child theme’s files. You can name it anything — for this demo, we’ll use getstartedwp-child.

Creating a WordPress Child Theme

Step 2: Create the child theme files

style.css — Create this file in your new folder and paste the following, adjusting the details to match your theme:

/*
Theme Name: GetStartedWP Child Theme
Theme URI: https://getstartedwp.com/
Description: GetStartedWP Child Theme.
Author: GetStartedWP
Author URI: https://getstartedwp.com/
Template: twentytwentyone
Version: 1.0
*/

The critical line is Template: twentytwentyone — it must match the parent theme’s folder name exactly. That’s what tells WordPress this is a child theme and which parent it belongs to.

functions.php — Create a second file that loads the parent theme’s stylesheets:

<?php
if ( ! defined( 'ABSPATH' ) ) exit;

/* Enqueue parent theme styles */

function gswp_child_theme_styles() {
    wp_enqueue_style(
        'child-style',
        get_stylesheet_uri(),
        array( 'twenty-twenty-one-style' ),
        wp_get_theme()->get( 'Version' )
    );
}
add_action( 'wp_enqueue_scripts', 'gswp_child_theme_styles' );

If your parent theme is different, replace twenty-twenty-one-style with that theme’s stylesheet handle.

Don’t use @import in style.css to load the parent stylesheet — it’s slower and can cause the parent styles to load twice. Enqueueing, as shown above, is the correct method.

screenshot.png (optional) — a 1200×900px image shown as the theme’s preview in Appearance → Themes.

Step 3: Activate the child theme

Go to Appearance → Themes and you’ll see your child theme listed. Click Activate. Your site should look identical to before — now any CSS or template changes you make go into the child theme, safe from parent updates.

Method 2: Create a child theme with a plugin

If you’d rather not touch code, Child Theme Configurator (300,000+ active installs, regularly updated) does it all through a settings page.

  1. Install and activate Child Theme Configurator from Plugins → Add New.
  2. Go to Tools → Child Themes (in newer versions it may appear under the Themes menu).
  3. Select the Parent/Child tab, choose your parent theme, and click Analyze to verify it can be used as a parent.
  4. Name your child theme, review the default settings, and optionally copy the parent’s menus, widgets, and Customizer settings so nothing is lost in the switch.
  5. Click Create New Child Theme, preview it to confirm everything looks right, then Activate & Publish.
Installing WordPress Child Theme Generator Plugin
WordPress Child Theme Configurator Page
WordPress Child Theme Validator
Child Theme Configurator Settings
Child Theme Configurator Section 7
Child Theme Configurator Section 8
Child Theme Created
Publishing New Child Theme

What to customize first

With your child theme active, the typical first customizations are:

  • CSS tweaks in the child theme’s style.css (fonts, colors, spacing).
  • Template overrides — copy a template file (like header.php) from the parent into the child theme folder and edit the copy. WordPress will use your version automatically.
  • Custom functions in the child theme’s functions.php.

Want to go deeper into WordPress code? Our basic plugin development tutorial shows how to package custom functionality as a plugin instead.

Editorial Team

The GetStartedWP editorial team is a team of WordPress experts and developers. We are passionate about creating and sharing content like tutorials and guides about the entire WordPress ecosystem.

Disclousure: Our content is reader-supported. This means if you click on some of our links, then we may earn a small commission.

This Post Has 2 Comments

  1. Avatar photo
    Juan Garzon

    Thanks for that awesome tutorial, it helped me a lot.

  2. Avatar photo
    Arturo Guevara

    Nice tutorial, good explained. Where can I find more lessons or examples?

Leave a Reply