Are you wondering what a WordPress child theme is and whether or not you need one? If so, consider this nightmare scenario that keeps too many WordPress site owners from properly updating their websites:
You log in to your WordPress dashboard and notice that an update is available for your theme. You know that updates are good, and you want to keep your site secure, so you click the “upgrade” button and wait while WordPress does its thing.
Once the update is complete, you take a look at your site. That’s when you realize that something has gone terribly wrong. Your site is a mess, and all of the customizations you’ve made to your theme design are gone.
WordPress child themes eliminate this problem.
And yet, you don’t always need a child theme.
WP Apprentice members frequently ask me about child themes. I can tell by the nature of the questions that there’s an enormous amount of confusion surrounding the topic. In this article, I’ll explain the basics. By the end of this article, you’ll know what a child theme is and when you need one.
What is a WordPress child theme?
A child theme is a special kind of WordPress theme that inherits all of the design elements of its parent theme. A child theme with no customization is identical to its parent.
It works like this: you have a WordPress theme, but you want to make it your own by customizing it. You could modify the theme to meet your needs, but doing so creates a big problem in that WordPress themes are frequently updated. If you customize your theme, then update it, there’s a good chance that all of your changes will be lost.
You might think that you’ll just avoid updating your theme. Avoiding updates is a risky proposition. WordPress themes get updated for many reasons: to conform to new WordPress coding standards, to fix bugs, and to fix security issues.
Avoiding updates could break your site or even open you up to hacking. In other words, theme updates aren’t optional. If you want to maintain a secure and healthy WordPress site, you need to install theme updates as they become available.
By making changes to a child theme, you ensure that you can safely update your theme while maintaining site security and protecting your hard work.
When do I need a child theme?
Here’s the thing that causes the most confusion: You don’t always need a child theme.
So, how do you know whether or not you need a child theme? The answer depends on how you customize your theme.
Have you, or do you plan to modify your theme’s underlying code? That includes any of the following:
- Edit the theme’s CSS stylesheet.
- Edit any of the theme’s PHP templates.
- Edit the theme’s functions.php file. Even just to add a single line of code.
- Modify any of the theme’s assets stored in the theme folder — including javascript files and images.
If you answered yes to any of these questions, you need a child theme.
On the other hand, if your theme customizations are made exclusively through the WordPress dashboard, you don’t need a child theme. That includes changes made through the Theme Customizer (confusing, I know). The Theme Customizer doesn’t change your theme files.
Changes made through the Theme Customizer, or a theme settings page, are stored in a database. That means that theme updates won’t overwrite your changes.
How to make a child theme
For full instructions on setting up a child theme, see my recent post on how to make a WordPress child theme. You will need the following to set up your child theme.
- An FTP program. You use this to transfer files to your web server.
- FTP login credentials for your web server.
- A plain text editor (NOT a word processor).
Once you’ve got those lined up, you should be able to create a child theme in a matter of minutes.
Benefits of a WordPress child theme
Child themes add to the overall security of your website. They also make theme customization much easier. It’s possible to create a custom WordPress theme simply by modifying the CSS of your child theme. That makes theme customization accessible to designers who otherwise don’t code. Just remember to create your child theme first, then make changes to the child theme’s CSS file.
Child themes are also a great learning tool. When you’re just starting out working with WordPress themes, a child theme allows you to try all kinds of things without having to worry about breaking your theme. If things go wrong, you can get back to your original design simply by activating the parent theme.
25 thoughts on “What Is a WordPress Child Theme and Do I Need One?”
Great video. I have a question. I am using child theme of the “Storefront” Theme called “TheShop”. I have edited the CSS & PHP files directly through the editor. Because “TheShop” is a child theme already, I could not make a child theme of it. Is it okay to edit the files directly for a child theme that is available through WP? Or could the author of “TheShop” make an update that would effect me? Or would all updates be to the parent theme “Storefront”?
Thank you for your help!
Hi K,
This is a great question. As you’ve noted, there’s no way to make a child theme of a child them (a grandchild theme?). So, when customizing a child theme you have no option but to edit the child theme files. That’s usually not a problem when it’s a child theme that you’ve created as a way to customize the parent theme. However, it might be a problem if it’s a commercial child theme. The child theme author could release an update that overwrites your customizations. At which point, you’re right back in the same boat you were in before using a child theme.
My advice: Keep a backup of your customizations, just in case. And that means that editing through the WP editor is not a good idea (in fact, it rarely is a good idea). Better to have a test site with a copy of your theme and child theme installed. Make the changes on the test site, then upload the modified theme files to your server via FTP. Watch this tutorial on using Local to set up a WordPress installation on a PC or Mac, if you’re not sure how to proceed
Hi
This is prabhu. i’m a web developer. i like working with wordpress. As for the beginners your article about what is wordpress child theme will be really helpful for them. Keep updating posts like this.
Thankyou
Incredibly informative and clear! Thanks Kirk! 🙂
Kirk,
Excellent video. Unusual to hear an American presenter ‘talk’ instead of ‘shout’. Is it not ‘safer’ to start out with a ‘child’ theme anyway, even if you don’t actually need one at the beginning? I say this because I have never used a ‘child’ theme in 6 years and never needed one before this latest venture. Because I am now more accomplished with CSS etc. I am getting a warning message on my dashboard about doing CSS stuff that won’t be updated with a WP update. Therefore would I not have been better off just starting out with a ‘child’ theme at the get-go to have having to start over again?
In theory, yes. Especially if you’re the sort of person who’s inclined to tinker with your theme’s underlying code. However, I’ve found that MANY (sorry to shout) novice WordPress users get overly hung up on creating a child theme when the vast majority have no inclination to modify the underlying theme code. I wrote this post in an attempt to clear up some of the confusion. If you’re only “customizing” your theme through the theme customizer or a plugin that saves modifications to the database, you won’t need a child theme.
Having a child theme is definitely a good practice as it make customization easier and updating the parent theme does not spoil the styling of child theme.
Nice video – although am still a little confused.
If a child theme allows you to protect your code changes, why use a parent theme in the first place, even if you’re not changing code? Just use a child theme and be done with it.
The parent theme is the base design. The child theme is the customization of the base design.
Without a parent theme the child theme would become the parent theme. And updates to that theme would overwrite your customizations.
This is literally the best explanation I have found. Easy to understand for the beginner when so many sites still use techie lingo assuming we newbies have a clue when actually, we do not. Thank you for taking that into consideration. Looking forward to seeing more of your helpful info. I am going to move a current Shopify site over to WP and it’s been a few years since I dabbled with WP so I needed some refresher info. Thanks!
This is really a good article. I been reading around for 2 days about child theme & I keep getting more confusion. But your article clear up so many thing. So my situation & question is …. I want to use a free wp theme for now & all I want to change is its home page. Mine will be a food blog. I want to change my home page layout because I didn’t find any free theme that meet all my requirements. I have no idea about coding, CSS or php… so I will use available widget & page builder plugins. Should I still need a child theme? Thanks in advance
If your build your home page with a page builder plugin, then you won’t need a child theme. You only need a child theme when you’re editing code (PHP, CSS, HTML, JavaScript).
Thank you so much for quick response
But if I enter CSS through the option “custom CSS” inside the front-end builder (eg Divi Builder), I should use a child theme, right?
If I instead put that CSS-code in the “theme custumizer”, I wont need a child theme?
Novice
In either example, you won’t need a child theme. Entering custom CSS through either the front-end builder or through the theme customizer will result in your CSS being stored in the database. And that will always be protected from a theme update.
Thank you. 🙂
Very clear explanation to my question: do I need one?
I am planning to add a custom font in my OceanWP (free) theme.
I found instructions on oceanwp.org page and test it. It works!
But they were using child theme … Hey, what is that? Why? Etc…
And you gave us very clear answer!
Thank you!
Hello, congratulations for the great info!
When I go to my theme customizer (cheerup), there is a category called ‘additional css’ where I add css codes to change my styles. In this case, do I need a child theme?
In summary, I’m not doing any editing directly on the files, only on the category ‘additional css’ from my theme customizer.
Thank you
The “additional css” box saves your customizations even after a theme update. No need for a child theme if you aren’t editing files.
Crystal clear explanation. Thanks v much.
I still have some confusion about child theme. Is that true if I use child theme is a backup for my main theme?
Hi Lina, that’s not quite true. The child theme prevents your customizations from being overwritten when your parent theme is updated. If something happens to your parent theme you’ll need to download it from the original source or restore from backup. So, it’s always good to have a backup of your parent theme and your child theme.
I love that your video is so easy to understand. I’m a novice when it comes to changing code, and I realize now that I don’t really need child theme. Thanks for taking the time to make the video.
Thanks for the great tips. I did not setup my theme as a child initially, Now I am changing my theme where I have the opportunities to setup as child theme, where I can customize based on my needs.
Hi Kirk,
Super helpful video and very useful Comments. Still a bit nervous so requesting final confirmation!
Still selecting a theme. Abandoning earlier selection in favor of GeneratePress with its plethora of Customizer options, and starting over with a fresh WordPress installation on a new subdomain.
From your video and the user comments it looks like we don’t need a child theme at this stage. If, down the road, we find it necessary to get into the code (or have a developer do so), we can create a child theme at that point.
Is that correct?
Many thanks,
Linda
Hi Linda,
Yes, that’s correct! GeneratePress has a million customization options and all of those are saved in your database – so, no need for a child theme.
kb
Comments are closed.