Guides/Edit your website/Themes/Create a child theme

Create a child theme

Last reviewed on December 10, 2025

If you have knowledge of HTML and PHP, you can create a child theme to safely customize a WordPress theme without losing your changes when the original theme (the parent theme) is updated. In this guide, you will learn how to create and use a child theme on your WordPress.com site.

This feature is available on sites with the WordPress.com Personal, PremiumBusiness, and Commerce plans. For free sites, upgrade your plan to access this feature.

How child themes work

A child theme inherits the design and functionality of a parent theme. Customizations are made in the child theme’s files, keeping the parent theme’s files unchanged. When the parent theme is updated, your customizations in the child theme remain intact.

For simple, visual changes, you could use the built-in Styles options or custom CSS instead of a child theme. A child theme is useful for more substantial changes.

To use an analogy from Kathryn Presner’s talk on Getting Comfortable with Child Themes, consider a parent theme to be a master recipe for brownies. You could create a child recipe called nutty brownies that inherits all the ingredients and steps but with the addition of nuts.

📌

You cannot create a child of a child theme. All child themes must reference a parent theme directly.

Use the Create Block Theme plugin

You can use the “Create Block Theme” plugin to quickly create blank themes, build new themes based on your currently active theme, and generate child themes of active parent themes. The plugin also includes functionality to create new style variations, export themes, and save modified templates and styles to your active theme.

Follow the instructions in the Create Block Theme plugin description to install and set up the plugin.

Manually create a child theme

While there are additional plugins available to help you create a child theme, you can create a child theme manually. To create a child theme manually, follow these steps:

Step 1: Prepare the child theme

The first step to creating a child theme is to download the parent theme to your computer and create copies of specific files. Follow these steps:

  1. Visit the WordPress.org Theme Directory, choose a theme, and click the “Download” button to save it to your computer.
  2. Once downloaded, double-click on a Mac to extract the folder. Or if you’re on Windows, right-click on the zip file and select “Extract all.”
  3. In the new parent theme directory on your computer, create a new folder and give your child theme a name, for example, twentytwentyfive-child.
    • It is recommended that the name of your child theme directory is appended with ‘-child’.
    • Make sure that there are no spaces in your child theme directory name.
  4. Copy and paste the style.css and functions.php files from your original parent theme folder into your new child theme folder.

Step 2: Customize the child theme’s files

After creating a child theme folder with copies of the parent theme’s style.css and functions.php files, you will customize the files to point to the parent theme. Follow these steps:

  1. In your child theme folder, open your style.css file using a text editor, such as Notepad, Atom, Sublime Text, or any other text editor of your choice.
  2. Make the following edits:
    • Change the Theme Name to what you named the child theme (ex: Twenty Twentyfive Child.)
    • Add the following line below theme name: template: parenttemplate.
      • Example: template: twentytwentyfive
      • The template name must be a 100% match of the folder name of the parent theme, relative to the wp-content/themes folder. In this case, we know that the Twenty Twenty-Four theme folder is located at wp-content/themes/twentytwentyfive. Therefore, the Template value must be twentytwentyfive.
      • Example code to add to the child theme’s styles.css file:
/*
Theme Name: Twenty Twenty-Five Child
Template: twentytwentyfive
Theme URI: https://wordpress.org/themes/twentytwentyfive/
Author: the WordPress team
Author URI: https://wordpress.org
Description: Twenty Twenty-Five emphasizes simplicity and adaptability. It offers flexible design options, supported by a variety of patterns for different page types, such as services and landing pages, making it ideal for building personal blogs, professional portfolios, online magazines, or business websites. Its templates cater to various blog styles, from text-focused to image-heavy layouts. Additionally, it supports international typography and diverse color palettes, ensuring accessibility and customization for users worldwide.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyfive
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
  1. Save your changes to the style.css file.
  2. In your child theme folder, open the functions.php file using a text editor, such as Notepad, Atom, Sublime Text, or any other text editor of your choice.
  3. Add the following code at the bottom of the child theme’s functions.php file to load the parent and child theme styles:
// Enqueue parent and child theme styles
function my_child_theme_enqueue_styles() {
    $parent_style = 'twentytwentyfour-style'; // Replace with your parent theme's unique style identifier
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style ),
        wp_get_theme()->get('Version')
    );
}
add_action( 'wp_enqueue_scripts', 'my_child_theme_enqueue_styles' );
  1. Save your changes to the functions.php file.

Step 3: Upload and activate your child theme

After you have modified your child theme’s style.css and functions.php files to reference the parent theme, you are ready to upload and activate your new child theme.

💡

Upload and activate your child theme on your staging site first. Once you’re confident it works the way you want, you can sync staging to production or upload the child theme to your production site.

Follow these steps to upload and activate your child theme:

  1. Compress the child theme folder into a zip file.
    • On Windows:
      • Locate the file or folder that you want to zip.
      • Press and hold (or right-click) the file or folder, select (or point to) “Send to”, and then select “Compressed (zipped) folder”.
      • A new zipped folder with the same name is created in the same location. To rename it, press and hold (or right-click) the folder, select “Rename”, and then type the new name.
    • On Mac:
      • Locate the items to zip in the Mac Finder (file system).
      • Right-click on a file, folder, or files you want to zip.
      • Select “Compress Items”.
      • Find the newly created .zip archive in the same directory.
  2. Navigate to Appearance → Themes on your staging or production site.
  3. Click the “Upload Theme” button and upload the parent theme’s zip file, and then again to upload the child theme’s zip file. Both theme files must be present for the child theme to work.
  4. Click the “Activate” button under the child theme’s thumbnail to activate the theme on your site.

Troubleshooting and best practices

  • If your child theme does not appear, check that the Template field matches the parent theme’s folder name exactly.
  • If styles are missing, verify that your functions.php file is loading both parent and child styles correctly.
  • For advanced code help, consider hiring a web developer. WordPress.com support does not provide custom code troubleshooting.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!