Create a WordPress Child Theme: Update-Safe Customisations to Design and Functions

A child theme is a subordinate WordPress theme that inherits the functions, templates and design of an existing parent theme. It allows you to make your own customisations without directly changing the files of the original theme.

This is important because changes to a parent theme can be overwritten during the next theme update. So if you work directly in files such as style.css, functions.php, header.php, footer.php or single.php of a purchased or free theme, you risk losing your customisations during an update.

Briefly explained: A child theme protects your individual customisations from theme updates. The parent theme remains updateable, while your own CSS, PHP or template customisations are stored in the child theme.

What is a parent theme?

The parent theme is the main theme of your WordPress website. It provides the basic design, templates, functions, stylesheets and often also theme options. Examples include themes such as Twenty Twenty-Four, Astra, GeneratePress, Kadence, OceanWP or many premium themes.

A child theme always requires a parent theme. Without a parent theme, it cannot function correctly because it inherits its files and functions.

When using a child theme, WordPress generally loads the child theme as the active theme, but falls back to the parent theme for missing files. This means you only need to create the files that you actually want to customise.

Why a child theme makes sense

A child theme is especially useful if you want to make changes that go beyond simple settings in the Customizer, Site Editor or page builder.

The most important advantages:

  • Update safety: The parent theme can be updated without overwriting your customisations.
  • Clean separation: Your own code remains separate from the original code of the theme developer.
  • Better maintainability: Changes are easier to find, document and undo.
  • Flexibility: You can selectively customise CSS, PHP functions, templates or JavaScript.
  • Security: The parent theme can continue to receive security updates.
  • Professional workflow: Customisations can be tested more effectively in staging, Git or development environments.
Practical tip: As soon as you want to edit theme files, you should not work directly in the parent theme. Use a child theme or another clean development structure.

When do you not need a child theme?

Not every small change requires a child theme. Many customisations can now be done without code. Modern themes in particular offer extensive settings for colours, typography, spacing, headers, footers and layouts.

A child theme is usually not required for:

  • Changes in the Customizer,
  • Changes in the Site Editor,
  • Simple settings in the theme panel,
  • Menus and widgets,
  • Content in pages and posts,
  • Small CSS changes via Appearance > Customizer > Additional CSS,
  • Page builder layouts, provided no theme files are changed.

If you only want to change colours or the logo, the Customizer, Site Editor or theme options panel is often sufficient.

When is a child theme recommended?

A child theme is recommended if you want to intervene directly in the technical structure of the theme.

Typical use cases:

  • Manage your own CSS files in a structured way,
  • Add your own PHP functions,
  • Override template files,
  • Customise header.php or footer.php,
  • Include your own JavaScript files,
  • Use hooks and filters,
  • Override WooCommerce templates,
  • Define your own block styles or theme variations,
  • Version and document changes.

Child themes for classic themes and block themes

For classic themes, child themes have been the standard for update-safe customisations for many years. Classic themes mainly work with PHP templates, CSS and JavaScript.

With modern block themes, the situation is slightly different. Block themes consist more strongly of HTML templates, blocks and a theme.json. Many customisations are made through the Site Editor. Nevertheless, block themes can also be extended with child themes, for example through custom templates, custom theme.json adjustments or additional styles. In the Theme Handbook, WordPress distinguishes between classic themes and block themes; block themes use the Site Editor and consist much more strongly of blocks. ([developer.wordpress.org](https://developer.wordpress.org/themes/?utm_source=chatgpt.com))

Theme type Typical customisations Is a child theme useful?
Classic theme PHP templates, CSS, functions, hooks Yes, highly recommended for file or code customisations.
Block theme Site Editor, templates, theme.json, block styles Yes, if customisations should be stored in files in a structured and update-safe way.
Page builder theme Builder layouts, theme builder, CSS, hooks Depends on the builder and the type of customisation.

Preparation: Use backup and staging

Before you create or activate a child theme, you should create a backup of your website. Even though a child theme is generally safe, errors in PHP files or template files can affect the website.

A backup is particularly important if:

  • the website is already being used productively,
  • WooCommerce or forms are active,
  • a page builder is being used,
  • custom PHP functions are planned,
  • template files are to be overridden,
  • several people are working on the website.

A staging environment is even better. There you can create, activate and test the child theme without putting the live website at risk.

????️ CURIAWEB expert recommendation

Test child theme customisations first in a staging environment. CSS changes, new PHP functions or template customisations can be checked there safely before they are transferred to the live website.

Learn more about WordPress hosting with staging

Step 1: Determine the parent theme folder name

Before you create a child theme, you need to know the exact folder name of the parent theme. This is important for the Template: line in the child theme’s style.css.

You can find the folder name under:

wp-content/themes/

Examples:

  • twentytwenty
  • twentytwentyfour
  • astra
  • generatepress
  • kadence

The value in Template: must exactly match the folder name of the parent theme. Capitalisation and spelling should be exactly correct.

Step 2: Create the child theme folder

Connect to your hosting account via SFTP, FTP or the cPanel File Manager. Open the directory:

wp-content/themes/

Create a new folder there for your child theme. The name should be unique and written in lowercase.

Examples:

  • twentytwenty-child
  • astra-child
  • generatepress-child
  • curiaweb-theme-child

Do not use spaces and avoid special characters in the folder name as far as possible.

Step 3: Create style.css

Create a file named style.css in the new child theme folder. This file requires a theme header. The most important entry is Template:, because this tells WordPress which parent theme should be used.

/*
Theme Name: Twenty Twenty Child
Theme URI: https://www.curiaweb.ch/
Description: Child theme for individual customisations to the Twenty Twenty theme.
Author: CURIAWEB GmbH
Author URI: https://www.curiaweb.ch/
Template: twentytwenty
Version: 1.0.0
Text Domain: twentytwenty-child
*/

Adjust Theme Name, Description, Author and especially Template to match your parent theme.

Important: The Template: line must contain the folder name of the parent theme, not the display name of the theme.

Step 4: Create functions.php

Create a file named functions.php in the child theme folder. In this file, you can load stylesheets, scripts and your own functions.

A simple, commonly used approach for loading the child theme stylesheet looks like this:

<?php
/**
 * Load child theme styles.
 */
add_action( 'wp_enqueue_scripts', 'curiaweb_child_theme_enqueue_styles' );

function curiaweb_child_theme_enqueue_styles() {
    wp_enqueue_style(
        'curiaweb-child-style',
        get_stylesheet_uri(),
        array(),
        wp_get_theme()->get( 'Version' )
    );
}

Many modern parent themes already load their own styles correctly. In such cases, it is often enough to load only the child theme stylesheet. With some older themes, the parent stylesheet must additionally be loaded explicitly. WordPress points out that enqueuing styles can depend on how the parent theme loads its styles. ([developer.wordpress.org](https://developer.wordpress.org/themes/advanced-topics/child-themes/?utm_source=chatgpt.com))

If your parent theme does not load its styles automatically, an approach like this may be necessary:

<?php
/**
 * Load parent and child styles.
 */
add_action( 'wp_enqueue_scripts', 'curiaweb_enqueue_parent_and_child_styles' );

function curiaweb_enqueue_parent_and_child_styles() {
    $parent_style = 'parent-style';

    wp_enqueue_style(
        $parent_style,
        get_template_directory_uri() . '/style.css'
    );

    wp_enqueue_style(
        'child-style',
        get_stylesheet_uri(),
        array( $parent_style ),
        wp_get_theme()->get( 'Version' )
    );
}

Which variant is correct depends on the parent theme. After activation, test whether all styles are loaded correctly.

Step 5: Add an optional screenshot image

To make your child theme look nicer in the theme overview, you can place a screenshot.png file in the child theme folder. This file is optional.

The screenshot image appears under Appearance > Themes. It does not affect the function of the child theme.

Step 6: Activate the child theme

Log in to the WordPress dashboard and open:

Appearance > Themes

Your new child theme should appear there. Activate it. After that, WordPress uses the child theme as the active theme, but still falls back to the parent theme.

Check immediately after activation:

  • Does the website look as it did before?
  • Is the menu still assigned correctly?
  • Are widgets in the footer and sidebars still present?
  • Is the logo visible?
  • Do Customizer or theme settings work?
  • Are CSS files loaded correctly?
  • Does the mobile view work?

Sometimes menus or widgets need to be reassigned once after a theme change, even if the child theme is based on the same parent theme.

CSS customisations in the child theme

You can write your own CSS rules in the child theme’s style.css. This is useful if the customisations should be stored permanently, transparently and in an update-safe way.

Example:

.site-header {
    border-bottom: 3px solid #c61f29;
}

.button,
.wp-block-button__link {
    border-radius: 6px;
}

For very small CSS customisations, the Customizer area Additional CSS may also be sufficient. However, if you plan many changes or want to work professionally, a child theme is clearer.

Add PHP functions in the child theme

You can add your own PHP functions in the child theme’s functions.php. Be very careful: a PHP error can make your website unreachable.

Typical PHP customisations are:

  • include your own scripts,
  • extend theme functions,
  • use hooks and filters,
  • customise WooCommerce output,
  • add shortcodes,
  • register image sizes,
  • customise admin functions.

If you are unsure, always test PHP code first in a staging environment.

Override template files

A child theme can override certain template files of the parent theme. To do this, copy the desired file from the parent theme into the child theme and keep the relative directory structure.

Examples:

  • single.php for single posts,
  • page.php for pages,
  • archive.php for archives,
  • header.php for the header,
  • footer.php for the footer,
  • woocommerce/single-product.php for WooCommerce templates.

If a file exists in the child theme, WordPress uses it instead of the file from the parent theme. Changes to the parent theme can then no longer automatically flow into these overridden files. You should therefore regularly check copied template files when the parent theme is updated.

Attention: Do not copy unnecessarily many template files into the child theme. Override only files that you really need to change.

Child theme and WooCommerce

WooCommerce templates can also be customised via a child theme. This is a common use case when product pages, cart, checkout or email templates need to be designed individually.

WooCommerce shows in the system status when template files are overridden and possibly outdated. Check this area regularly after WooCommerce updates.

Important for WooCommerce customisations:

  • create a full backup beforehand,
  • use a staging environment,
  • test checkout after changes,
  • check email templates,
  • check overridden templates after updates,
  • do not change business-critical functions without testing.

Create a child theme with a plugin

If you do not want to create files manually, you can also create a child theme with a plugin. There are various solutions for this. These can be helpful, but do not necessarily need to remain permanently active after creation if they are no longer required.

Advantages of a plugin:

  • easy entry point,
  • less manual file work,
  • automatic detection of the parent theme,
  • some additional analysis functions.

Disadvantages:

  • additional plugin in the system,
  • possible misconfiguration,
  • less understanding of the technical structure,
  • not always ideal for professional workflows.

For production websites, manual creation or a clean development environment is often more transparent.

Child theme and staging

A child theme should preferably not be developed directly on a live website. Use a staging environment to test customisations safely.

In staging, you can check:

  • whether the child theme is activated correctly,
  • whether styles are loaded,
  • whether PHP functions are error-free,
  • whether templates apply as expected,
  • whether the mobile display is correct,
  • whether WooCommerce processes work,
  • whether page builder layouts remain unchanged.

Only when everything works correctly should you transfer the change to the live website.

Security: Avoid typical mistakes

  • Wrong template name: The Template: line does not contain the parent theme folder name.
  • PHP error in functions.php: Website displays a critical error.
  • Parent theme not installed: Child theme cannot function.
  • Styles are loaded twice: Incorrect enqueueing can affect performance or display.
  • Too many templates copied: Parent theme updates no longer pass through cleanly.
  • No backup: Errors are difficult to undo.
  • Live development: Visitors see errors directly.
  • Menus and widgets not checked: Navigation or footer content is missing after activation.

Performance: Does a child theme make the website slower?

A child theme does not automatically make a website slower. What matters is which customisations it contains. A small child theme with clean CSS and few functions normally has hardly any noticeable impact.

Performance problems are more likely to arise from:

  • too many additional CSS files,
  • unnecessary JavaScript,
  • poorly written PHP functions,
  • unoptimised database queries,
  • too many external resources,
  • untested WooCommerce customisations,
  • stylesheets loaded twice.

Cleanly developed child theme code is maintainable and performant. Poor code, on the other hand, can cause problems — regardless of whether it is in a child theme or plugin.

SEO and GEO: Why child themes are indirectly important

A child theme does not automatically improve SEO. However, it can help implement important technical and design customisations cleanly.

SEO-relevant customisations in the child theme can include:

  • clean template structure,
  • better loading times through optimised code,
  • structured data, if correctly integrated,
  • accessible HTML structure,
  • optimised heading output,
  • clean WooCommerce templates,
  • avoidance of unnecessary layout errors.

For GEO, meaning Generative Engine Optimization, a child theme is indirectly helpful if it makes content more clearly structured, more accessible and technically cleaner. However, high-quality content, clear headings, internal linking and trustworthy information remain decisive.

Recommended approach

  1. Check whether a child theme is necessary: For simple design options, the Customizer or Site Editor is often sufficient.
  2. Create a backup: Back up files and database.
  3. Use staging: Do not test changes directly on the live website.
  4. Determine parent theme folder name: Use it exactly for Template:.
  5. Create child theme folder: Under wp-content/themes/.
  6. Create style.css: Add theme header with correct template entry.
  7. Create functions.php: Enqueue styles cleanly and add your own functions.
  8. Activate child theme: Under Appearance > Themes.
  9. Check website: Test layout, menus, widgets, mobile view, forms and shop.
  10. Document changes: This makes later maintenance easier.

Frequently asked questions about WordPress child themes

What is a child theme?

A child theme is a subordinate theme that extends a parent theme. It inherits its functions and allows your own update-safe customisations.

Why should I not edit a parent theme directly?

Direct changes to the parent theme can be overwritten during a theme update. Maintenance also becomes more difficult.

Do I need a child theme for small CSS changes?

Not necessarily. For a few CSS rules, Additional CSS in the Customizer may be sufficient. For extensive or long-term customisations, a child theme is cleaner.

Can I use plugins instead of a child theme?

For some customisations, yes. Small CSS plugins or code snippet plugins can help. However, if you want to override theme templates such as header.php, footer.php or WooCommerce templates, a child theme is the better way.

Will my website look different after activation?

Ideally, no. The child theme should inherit the parent theme. Nevertheless, check menus, widgets, logo, Customizer settings and mobile display.

Can a child theme damage my website?

Incorrectly written PHP code or faulty template files can cause problems. You should therefore use backups and staging.

Do child themes also work with block themes?

Yes, child themes can also be used with block themes. There, the Site Editor, HTML templates and theme.json also play an important role.

Does the parent theme have to remain installed?

Yes. A child theme requires its parent theme. If the parent theme is deleted, the child theme will no longer function correctly.


Maximum Freedom for Your WordPress Web Design

A child theme is the clean foundation for individual WordPress customisations. With WordPress Hosting from CURIAWEB, you benefit from fast NVMe infrastructure, SSL included, modern PHP support and a stable basis for professional development.

Discover WordPress Hosting with Staging

Do you have questions about creating one? Our CURIAWEB Support will be happy to help you personally.

Was this answer helpful? 0 Users Found This Useful (0 Votes)