Last Updated on April 20, 2022 by WP Knowledge Hub
A WordPress theme is a collection of templates that change the appearance of your website. While picking a specific theme doesn’t mean that your website has to look a certain way, a theme generally dictates the overall look and feel of your final website.
Most premium themes and even some free ones will have lots of customization options, like colors, fonts, layouts, etc., but sometimes larger custom jobs require bigger changes that go beyond the theme settings. Of course, WordPress themes are a collection of PHP files called templates, and those templates are easily customizable, but changing your theme files comes with a lot of risk!
If you make template changes to the parent (main) theme using an FTP client like FileZilla or Cyberduck, or by using the built in Theme File Editor, you will lose all those changes when you update the theme. While theme updates are not entirely necessary to keep using your website, they are certainly recommended for security reasons.
That’s why you need to create a child theme. A child theme is a copy of the parent theme that allows you to modify any template of your WordPress website without editing your parent theme files directly.
To understand why that’s important, you need to understand the relationship between parent and child themes.
What is a WordPress Parent Theme?
A parent theme is a full theme that uses all the necessary templates, meaning, it includes the WordPress template files and assets required for the theme to function properly.
Technically, the two main templates, index.php and the style.css files, are the only required templates. However, most themes will include everything from blogging templates, to e-commerce templates, to search templates, etc.
A regular WordPress theme IS a parent theme. A copy of that theme that uses overwritten templates to customize your website is called a child theme. If you have a child theme, you will activate it and replace the parent theme activation, but the parent theme must remain INSTALLED (even if it’s not activated) at all times.
What Exactly is a WordPress Child Theme?
A child theme is a copy of the parent theme that inherits the look and feel, and functions of its parent. When you make modifications to the child theme, they are kept in a different folder than the parent theme’s files. When you update the parent theme, the child theme will remain untouched, and your personal customizations and modifications will as well.
Benefits of Creating a Child Theme in WordPress
The most important benefit to creating a child theme is that it allows you to update the main theme without losing your customizations. Without a child theme, you’d have to redo your changes manually any time you updated the theme because your modifications would be lost. If you didn’t have one, every time the parent theme required an update, you’d be faced with an tough choice: either risk your site’s security, or lose everything you’ve done.
Now that you understand the benefits of using a child theme, let’s learn how we can easily create one!
Best Way to Create a Child Theme in WordPress
While you can creat a child theme manually in WordPress, doing it with a plugin only takes a few seconds. Below, we’ll use this super easy method to setup your child theme in a flash!
- Install the Child Theme Configurator plugin by Lilaea Media
- Go to Tools > Child Themes
- Select Create a New Child Theme
- Analyze your Current theme
- Click the blue ‘Create a New Child Theme’ button at the bottom after a successful analysis
- Activate your child theme
Step 1 – Install the Child Theme Configurator plugin by Lilaea Media
While there are many plugins that fit this description, based on experience, Child Theme Configurator by Lilaea Media is the best and easiest one to use by far. It only takes a few click to create and activate a child theme.
Go to Plugins > Add New > and search for Child Themes, and look for the plugin above. Click Install and then Activate.
Step 2 – Go to Tools > Child Themes
The plugin adds new functionality to your WordPress Tools. From your dashboard, go to Tools > Child Themes, and you’ll see the plugin options to create a new child theme. It will suggest analyzing your currently active theme to start.
Step 3 – Select Create a New Child Theme
Select Create a New Child Theme to start if this is your first time using this plugin. If you have already generated a child theme before, you can use the second option Configure and Existing Child Theme to make modifications to another one.
Step 4 – Analyze your Current theme
Right below that, where it says Select a Parent Theme, you can choose the theme you want to duplicate to get started. You’ll see a big blue Analyze button next to it.
By clicking Analyze, the Child Theme Configuratior plugin makes sure that the parent theme it wants to use as a base is structured correctly, has the required files, and does not have any PHP errors. If any of the above are not true, then you will get a warning that you should fix these issues before creating a child theme based on this particular parent theme.
Step 5 – Click the blue ‘Create a New Child Theme’ button
If all went well, you simply need to click the button to create your new child theme, and it will be added to the list of themes in your website’s theme directory.
Step 6 – Activate your child theme
It’s time to activate your child theme, BUT WAIT! First, if you have any custom CSS in the Customizer, it will not be displayed on your child theme unless you copy and paste it over into your child theme’s Customizer > Additional CSS.
Once you’ve copied all the custom CSS from your parent theme’s Customizer, actiavte your child theme, head to Appearance > Customize > Additional CSS and re-paste it here, and you’re done!