Skip to main content

Create a WordPress child theme (2026): The ultimate guide

Create a WordPress child theme step by step, manually or with a generator, for classic and block themes. Plus common mistakes and CSS examples.

FHFinn Hillebrandt
WordPress
Create a WordPress child theme (2026): The ultimate guide
Links marked with * are affiliate links. If you buy something through one of these links, we earn a commission.

Are you not 100% happy with the design of your WordPress theme and want to make custom changes so the look fits your project better?

Or are the features of your theme not enough for you and you plan to add more?

Then you should use a WordPress child theme. Especially if you want to make changes to the code of your WordPress theme or add code.

In this article, I'll show you, among other things:

  • What a child theme actually is and why you should use one
  • Where to find prebuilt WordPress child themes for your theme
  • How you can create a WordPress child theme
  • Whether you need one at all with a block theme

1. What is a child theme?

A child theme is a clone of your actual theme (also called the “parent theme”).

The files in your parent theme are overridden by the files in your child theme, or extended by them.

Similar to a WordPress plugin, which is an extension of WordPress and not standalone software, a WordPress child theme can't stand on its own.

To use one, the parent theme must accordingly not be deleted. It has to stay in the WordPress themes folder.

Classic themes and block themes

Modern WordPress themes are often block themes. You don't customize them in the Customizer but in the Site Editor (“Appearance > Editor”). Their design is controlled mainly by the file theme.json. Classic themes, in contrast, work with PHP templates, a style.css, and the Customizer.

For block themes, the WordPress developer handbook says: Your customizations in the Site Editor are stored in the database and survive theme updates. You only need a child theme here if you want to change files, so for example templates, template parts, patterns, the theme.json, or PHP code in the functions.php. The instructions in this article mainly describe classic themes. Where things work differently for block themes, I'll point it out.

2. Advantages of a child theme

Creating a child theme has three decisive advantages:

1. No changes after updates

Let's say you want to adjust the look of your WordPress theme with CSS.

With a classic theme, you can add code to the style.css in the WordPress backend via the theme file editor (with block themes under Tools).

Here you can edit fonts, colors, or the appearance of the entire website, for example. That way you don't have to edit every heading individually, but make global changes to the design:

The style.css lets you make extensive changes to the code

There's a problem, though:

Additions or changes to the style.css and other theme files, such as functions.php or header.php, are overwritten with every update of your theme, and you have to add them again, which can take a lot of time.

A child theme solves this:

When a theme is updated, only the files of the parent theme are updated, not those of the child theme. That means all additions and changes are kept.

2. Testing changes is risk-free

With a child theme, you can test every customization that comes to mind without any risk first.

If a change to the code doesn't lead to the result you wanted, or even causes serious errors on the website, you can switch back to the parent theme right away.

3. Easy to create

It sounds like a lot of work to create a child theme.

It isn't!

For many themes, there are even prebuilt child themes that you only have to download and install (you'll find a list in the section after next).

Creating one manually, which I'll explain to you step by step further down, is also easier than you think.

3. Disadvantages of a child theme

Even though a child theme brings many advantages, it also has two disadvantages that I don't want to keep from you:

  1. If there is a security vulnerability in the files of your child theme, later updates won't fix it.
  2. New features or changes that an update of the parent theme brings are sometimes overwritten by the child theme

A small WordPress plugin called Child Theme Check helps here.

It compares the files of your child theme with those of the parent theme and shows the differences. With around 700 installations, the plugin is small, but it is still maintained.

4. Does my theme offer a prebuilt child theme?

Many theme providers (or independent web developers) offer prebuilt child themes that you can download and install for free.

The links in the table lead to the theme providers' pages. Whether and how the respective child theme is offered there is best looked up in their documentation.

Here is a list of popular WordPress themes for which prebuilt child themes exist:

Theme
Link
AvadaDownload
DiviDownload
EnfoldDownload
The7Download
GeneratePressDownload
BeThemeDownload
The X ThemeDownload
Neve ThemeDownload
AstraDownload
Jupiter XDownload
BridgeDownload

5. Create a child theme with a generator or plugin

Your theme isn't on the list?

No problem.

You can also create a WordPress child theme yourself in a few minutes.

There are different ways to do that:

  1. You generate the files with an online generator
  2. With a block theme, you use the “Create Block Theme” plugin
  3. You create the child theme manually

5.1 Online generator from Astra

The free Child Theme Generator from Astra creates a ZIP file with a style.css and a functions.php. According to the provider's FAQ, it produces a standard structure that also works with themes other than Astra. To do that, you enter the folder name of the parent theme in the advanced options.

The free Child Theme Generator from Astra with an input field for the name of the child theme

You enter the name of the child theme, click “Generate”, and download the ZIP file. Then you install it in WordPress under “Appearance > Themes > Add New Theme > Upload Theme” and activate it.

5.2 Block themes: Create Block Theme

For block themes, there is the plugin Create Block Theme from WordPress.org with more than 20,000 active installations. It can create a child theme of the active block theme (option “Create Child Theme”) and carry over your changes from the Site Editor. You can also use it to create new style variations.

The Create Block Theme plugin in the WordPress plugin directory

6. Create a child theme manually

Creating a child theme manually is a bit more work, though no rocket science.

The advantages:

You save yourself from downloading another plugin and get to know the file structure of WordPress better, which can help you with future design customizations. Now I'll show you how you can create the WordPress child theme.

6.1 Create the theme folder

Before you can start with the practical steps, you first need an FTP or, better, SFTP access to your web space. So you don't go into the backend of your website via /wp-admin/ as usual, but access your web space with an external tool.

The whole thing then looks similar to Windows Explorer or the Mac Finder.

A free tool for this is the FileZilla Client, which I've been using for over a decade and can recommend wholeheartedly.

With FileZilla, you can connect to your web space in no time.

To connect to your web space successfully, you need the following data in addition to FileZilla, which you can usually find in the members area of your web host:

  1. Server name
  2. FTP or SFTP username
  3. Password
  4. Port

You enter this data in the top bar of FileZilla and connect to your web space.

Once the connection is established, you create a folder in which the files of your child theme will be stored later. You must not put this folder just anywhere in your web space, but absolutely under wp-content > themes.

Create a folder for your child theme via FTP.

In our case, you can already see the folder “DiviChildTheme” here, which we created with the help of the plugin (see the previous section).

To avoid confusion, we create a second child theme folder named “DiviChildThemeManuell”.

You do that as usual with a right click, and then create a new directory:

Create a child theme folder with FileZilla

6.2 Create the style.css

In the second step, you create the first file of the child theme, the so-called style.css.

Later, this file is responsible for saving individual design customizations in the child theme and, like all other files in the folder, it isn't overwritten by updates of the parent theme.

To generate the style.css, you use an HTML editor or plain text editor to create a text file that must be named style.css.

Paste the following content in here:

/*
Theme Name: Divi Child Manuell
Description: Manuell erstelltes Child Theme
Author: Blogmojo
Author URI: https://www.blogmojo.de
Template: divi
Version: 1.0
Text Domain: divi-child-manuell
*/

Of course, you should adjust the name, description, author, and so on accordingly.

You create the style.css with a text editor.Parent and child theme have to recognize each other and use the correct names

After you've created the file, you upload it to your web space, into the folder you created in step 1:

You upload the finished style.css to the standard directory of your theme.

6.3 Create the functions.php

For your WordPress child theme to work correctly, we have to create another file: the functions.php.

This file's job is to link the child theme with the main theme and make it clear to WordPress that the two themes are related.

You can also add functions to your child theme here later, to extend or customize the parent theme.

To create the file, you proceed the same way as in step 2. You create a text document named functions.php and paste the following code in here:

<?php
/**
* Parent-Theme CSS
*/

function child_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style'));

}
add_action( 'wp_enqueue_scripts', 'child_theme_styles' );

Whether you have to load the parent stylesheet yourself at all depends on your theme. If the parent theme already loads its own stylesheet and the child stylesheet, this code isn't needed. When in doubt, a look at your theme's documentation helps. If your theme shows no design after activation, try the code.

Save it, upload it to the child theme folder, and you're done!

With a block theme, you usually don't need this file, because the design runs through the theme.json. A style.css with the theme header is still required there.

If you did everything right, the folder of your WordPress child theme should now look like this:

Finished folder of the child theme.

If that's the case, you've already done 90%.

On to the last step.

6.4 Upload a screenshot

To personalize your WordPress child theme and make it clearly recognizable in the WordPress backend, you can add a screenshot or an image.

You name this image “screenshot.png” and upload it to your child theme folder as the last of three files.

Done!

Finally, you should check whether everything worked. To do that, go to Appearance > Themes in the WordPress backend, where your newly created child theme should now appear.

6.5 Export the settings of the parent theme (Customizer)

Before you activate the child theme you just created, you should first check whether you've already made individual changes to the design of your parent theme.

The problem is:

The child theme doesn't take these over automatically, and they would be lost.

But don't panic.

There is a simple and quick way to bring all customizations of the parent theme into the child theme with just a few mouse clicks.

This applies to classic themes with a Customizer (block themes don't have one). For this we use the WordPress Customizer in combination with the plugin “Customizer Export/Import”, which has more than 100,000 active installations:

Customizer Export/Import in the WordPress plugin directory

Once you've installed this small but ingenious plugin, the menu of your WordPress Customizer gets an additional item, “Export/Import”:

WordPress Customizer with import/export function

In case you've made design customizations, use the export function to export your Customizer settings quickly and easily.

Once you've done that, it's time to activate our new child theme:

6.6 Activate the child theme

To be able to activate our WordPress child theme, we go to the theme overview in the WordPress backend once more.

Here we click on the theme we want to activate.

I strongly recommend first checking that the theme really works smoothly by looking at a live preview. Only after you've checked it successfully should you activate the child theme.

Child theme preview and activation

6.7 Import the settings of the parent theme

If you exported the Customizer settings of your parent theme in step 6.5, it's now time to import them in the child theme.

For this, you go back to the Customizer.

Under the menu item “Export/Import” you already know, you can now upload and activate the file you exported earlier. That way, all design changes of the parent theme are transferred to the child theme right away.

For future customizations to the WordPress child theme, the parent theme stays untouched from now on.

Below, I'll show you common customizations that you can make quickly and easily to your WordPress child theme:

7. Customize the design of the child theme

After you've activated your child theme in WordPress, the whole world of CSS code and style customizations is open to you.

The great thing is:

Even if you're inexperienced in this area so far, you can't really break anything, because you're using a child theme.

Pretty cool, right?

I'd like to show you a few examples now.

By the way, you can paste CSS code directly into the style.css of the child theme. You'll find this file in the theme file editor. Some hosts and security plugins turn it off. In that case, you edit the file via SFTP.

You can make design customizations in the style.css.

Alternatively, you can use the “Additional CSS” item in the Customizer. With a block theme, you'll find it in the Site Editor under “Styles”. The selectors in the following examples (for example body.page or .single-post article) depend on your theme. Adjust them if nothing happens.

Example 1: Change headings

The following code turns the main headings of all pages (not blog posts) a bright pink. The heading is also centered:

body.page h1 {
color: #ff4987;
text-align:center;
}

Example 2: Change blog subheadings

If you want to show a divider under subheadings in blog posts, you can do that with the following code:

body.single-post h2 {
padding-bottom: 10px;
border-bottom: 3px solid #ff4987;
margin-top: 80px;
}

Example 3: Add an image shadow

As another example, I'd like to show you how to automatically display an image shadow on all images you use within posts:

.single-post article img {
-webkit-box-shadow: 4px 3px 9px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 4px 3px 9px 0px rgba(50, 50, 50, 0.75);
box-shadow: 4px 3px 9px 0px rgba(50, 50, 50, 0.75);
}

Example 4: Replace the font globally

If you're not happy with the font of a theme, you can of course change it globally in the child theme.

For this, you first have to search the fonts database for the font you want (in the example, I chose Lato):

In your child theme, you can replace the fonts globally

...and then paste the following command into the functions.php:

function load_google_fonts() {
wp_register_style('googleFonts', 'https://fonts.googleapis.com/css2?family=Lato:wght@300');
wp_enqueue_style( 'googleFonts');
}
add_action('wp_print_styles', 'load_google_fonts');

You replace the URL https://fonts.googleapis.com/css2?family=Lato:wght@300 depending on the font and the font weights you want (just copy it from Google Fonts).

If you want to make changes to parts of the page such as the footer or header, you first have to copy the necessary files from the folder of your parent theme and paste them into the folder of the child theme.

Every part of the page has its own .php file.

If you want to make changes to the header and footer, you first have to copy these files

After you've pasted these files into the folder of the child theme, they appear as a choice in the theme editor and you can add code.

8. Fix problems with child themes

You're now able to create a WordPress child theme manually or with the help of a plugin, change the design, and add functions.

But what if problems come up while creating or customizing the WordPress child theme?

Since it's usually the same mistakes again and again, you should first work through the following checklist point by point.

I'm sure this solves 95% of all problems:

8.1 Is the child theme activated at all?

Maybe the parent theme is still activated? In that case, changes you make to the child theme in the WordPress theme editor are logically not displayed.

8.2 Browser cache and page cache cleared?

Refresh the cache of your performance and caching plugins in WordPress and of your browser.

If you're looking at a cached, meaning older, version of your website, you can't see changes.

8.4 Fatal error after a change to the functions.php?

The functions.php of the child theme is loaded in addition to that of the parent theme, not instead of it. If you copy a function from the parent theme, you get a duplicate function name and WordPress reports a fatal error. In that case, delete the change again via SFTP or rename the child theme folder, and WordPress falls back to another theme.

8.3 Check that you've named all files correctly

This mistake creeps in very easily. functions.php becomes funcions.php, for example (it happened to me while creating this guide).

Also check the content of the style.css, especially the name of the parent theme. Upper and lower case have to be respected here, too!

Frequently asked questions

What is a WordPress child theme and why do I need one?
A child theme is a clone of your WordPress theme that overrides or extends its files. You need one because changes to the code (for example in the style.css) get deleted when the theme is updated. In the child theme, your customizations are kept.
How do I create a WordPress child theme?
You can create a child theme with a generator (for example the free one from Astra), with the Create Block Theme plugin for block themes, or manually. Manually, all you need is a folder under wp-content/themes and a style.css with the theme information and the template entry. With many classic themes, a functions.php additionally loads the parent stylesheet.
Are there prebuilt child themes for my WordPress theme?
Yes, many popular themes such as Divi, Avada, GeneratePress, Astra, Enfold or Neve offer prebuilt child themes as a free download. You can usually find them on the theme developer's website or on specialized portals.
Which files does a WordPress child theme need at a minimum?
The only mandatory file is the style.css with the theme information (name and template, meaning the folder name of the parent theme). With classic themes, you usually add a functions.php that loads the parent stylesheet. Optionally, you can add a screenshot (screenshot.png) for the theme preview.
What are the disadvantages of a WordPress child theme?
Security vulnerabilities in child theme files are not fixed by updates. In addition, new features of the parent theme can be overwritten by the child theme. The “Child Theme Check” plugin helps you spot such differences.
Do I need a child theme for a block theme?
Not necessarily. Changes you make in the Site Editor are stored in the database and survive theme updates. A child theme is worth it if you want to change files, for example templates, patterns, the theme.json or PHP code in the functions.php.
How long does it take to create a child theme?
With a generator, or with the Create Block Theme plugin for a block theme, it takes a few minutes. Creating one manually with style.css and functions.php is also done in a quarter of an hour, as long as you already have access to your web space.
FH

Finn Hillebrandt

SEO expert and blogger

Finn Hillebrandt is the founder of Blogmojo and an SEO expert with 15+ years of experience.

He has been an online entrepreneur since 2011 and started Blogmojo in 2016. It has grown into one of the most-visited German blogs about SEO, WordPress, and blogging, with more than 1,000,000 visitors a year.

Finn has written 140+ articles on blogging, WordPress, and SEO. The articles on blogmojo.com are English translations of them.

Follow Finn on Instagram and Threads.