How to Manually Create a WordPress Child Theme (Step-by-Step Guide)

Creating a WordPress child theme is the safest way to customize your website without losing your changes whenever your parent theme receives an update. While there are plugins that can generate a child theme for you, creating one manually gives you a better understanding of how WordPress themes work and provides greater flexibility.

In this guide, we’ll walk through how to manually create a child theme using only two required files: style.css and functions.php.


What Is a WordPress Child Theme?

A child theme is a separate WordPress theme that inherits the design and functionality of another theme, known as the parent theme.

Using a child theme allows you to:

  • Customize your website safely
  • Preserve changes after theme updates
  • Add custom CSS and PHP
  • Override template files
  • Keep your customizations organized

If you plan to modify your WordPress theme, using a child theme is considered a best practice.


Requirements

Before getting started, you’ll need:

  • Access to your WordPress files via FTP, File Manager, or SSH
  • Basic knowledge of CSS and PHP
  • An installed parent theme

Step 1: Create a New Child Theme Folder

Navigate to your WordPress themes directory:

wp-content/themes/

Create a new folder for your child theme.

Example:

aurora-child

The folder name can be anything you like, but using a name related to the parent theme helps keep things organized.


Step 2: Create the style.css File

Inside your new folder, create a file named:

style.css

Add the following header:

/*
Theme Name: Aurora Child

Theme URI: https://example.com/themes/aurora-child

Description: Aurora Child is a child theme created for safely customizing the Aurora parent theme.

Author: Your Name

Author URI: https://example.com

Template: aurora

Version: 1.0.0

Text Domain: aurora-child

License: GNU General Public License v3 or later

License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/

Understanding Each Field

Replace the placeholder information with your own.

Theme Name

The name displayed under Appearance → Themes.

Example:

Aurora Child

Theme URI

A website where users can learn more about your theme.

Description

A brief explanation of your child theme.

Author

Your name or company.

Author URI

Your personal or business website.

Template

This is the most important field.

It must exactly match the folder name of your parent theme located inside:

wp-content/themes/

Example:

aurora

If this value is incorrect, WordPress will not recognize the child theme.

Version

The current version number.

Text Domain

Used for translations.

A common convention is:

aurora-child

License

Most child themes simply use the standard GPL license.


Step 3: Create the functions.php File

Next, create a file named:

functions.php

Add the following code:

<?php

/* Load the parent theme stylesheet */

function aurora_child_enqueue_styles() {

    wp_enqueue_style(
        'parent-style',
        get_template_directory_uri() . '/style.css'
    );

}

add_action( 'wp_enqueue_scripts', 'aurora_child_enqueue_styles' );

This file loads the parent theme’s stylesheet so your child theme inherits all of its styling.

Without this file, your website will appear unstyled because the parent CSS won’t load.


Step 4: Activate Your Child Theme

After creating both files:

  1. Log into your WordPress dashboard.
  2. Navigate to Appearance → Themes.
  3. Locate your child theme.
  4. Click Activate.

Your website should look exactly like the parent theme while giving you a safe place to add customizations.


What Can You Customize?

Once activated, your child theme allows you to:

  • Add custom CSS
  • Create custom template files
  • Override parent theme templates
  • Add custom PHP functions
  • Modify layouts
  • Extend theme functionality

Best of all, your changes remain intact when the parent theme is updated.


Common Mistakes to Avoid

When manually creating a child theme, watch out for these common issues:

  • The Template value doesn’t exactly match the parent theme folder.
  • Misspelling style.css or functions.php.
  • Forgetting the opening <?php tag.
  • Uploading the child theme outside wp-content/themes.
  • Not activating the child theme after creating it.

Why Use a Child Theme?

Editing a parent theme directly is never recommended because updates overwrite your modifications.

Using a child theme offers several benefits:

  • Safe updates
  • Easier maintenance
  • Cleaner organization
  • Better compatibility with WordPress standards
  • Simple rollback if needed

Whether you’re making a few CSS tweaks or building extensive custom functionality, a child theme provides the safest development workflow.

Final Thoughts

Creating a WordPress child theme manually only requires two files—style.css and functions.php—but it lays the foundation for safe, long-term customization. By ensuring your Template value matches the parent theme’s folder name and properly enqueueing the parent stylesheet, you can customize your website without worrying about future updates overwriting your work.

For developers, freelancers, and website owners alike, learning how to build a child theme is an essential WordPress skill.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.