A WordPress child theme is a subfolder that inherits all the functions and styles of a parent theme, without you modifying the original theme. This way, your changes remain intact when the parent theme receives an update. In this article, you’ll see exactly how to create, activate, and safely test a child theme in a few steps.
What is a child theme and why use one
A child theme automatically inherits the styling, templates, and functionality of the parent theme, but acts as a separate layer where you place your own CSS and PHP modifications. If you modify the parent theme directly, those changes will disappear as soon as the theme developer releases an update. With a child theme, that risk disappears.
Key benefits at a glance:
- Your customizations are never lost during a theme update
- Clearer maintenance, because your own code stays separate from the original theme files
- You can safely experiment without breaking the live site
Creating a child theme: step by step
You’ll need access to your files via FTP or SFTP, and a working parent theme that’s already installed in WordPress.
Create a new folder
Connect to your hosting via FTP or SFTP and navigate to /wp-content/themes/. Create a new folder there, for example twentytwentyfour-child.
Create style.css
Add a file called style.css to the new folder with a comment block at the top that includes at least Theme Name and Template. The Template line must exactly match the folder name of the parent theme, otherwise the link won’t work.
Create functions.php
Create a file called functions.php and load the parent theme’s stylesheet in it using wp_enqueue_style, followed by your own child stylesheet. This way, the original styling is preserved and you can build on top of it.
Activate the child theme
Go to Appearance β Themes in your WordPress dashboard. Your child theme will appear as a separate theme; click Activate. Immediately check whether the site still looks normal.
Modifying and testing a child theme
Once the child theme is active, you can make changes without touching the parent theme. Add your own CSS to style.css, or extend functions in functions.php. If you want to customize a specific template file, copy that file from the parent theme to the same location in your child theme and edit it there. WordPress will automatically use the version from the child theme once it exists.
Thoroughly test after each change before proceeding:
- Check the display on both desktop and mobile
- Click through important links and menus
- Submit a test form to check that everything arrives correctly
- Open the browser console (F12) and check for error messages
If your site runs on fast infrastructure, you’ll see changes reflected immediately without delay, making testing much easier. Also make sure your web hosting creates regular backups, so you can always fall back on a working version if something goes wrong.
Removing or switching a child theme
If at some point you want to go back to the parent theme or switch to a different theme, do so in the correct order to avoid errors.
- First activate a different theme (for example the parent theme or a default theme) via Appearance β Themes
- Then remove the child theme via the same page, or manually via FTP by deleting the theme folder
- After switching, check whether widgets, menus, and page layouts are still correct, since some settings are theme-specific
If you’re considering switching hosting providers while working on this, first read how switching to Tandata works, so your site moves without downtime.
Frequently Asked Questions
Can I create a child theme from a free theme?
Yes, that works perfectly fine. Commonly used free themes are well documented and receive regular updates, which makes a child theme especially useful.
What happens to my child theme when the parent theme is updated?
The parent theme gets updated, but your child theme and your customizations remain unchanged. That’s exactly the purpose of this setup.
Can I also create a child theme from a paid theme?
In most cases, yes. Check the documentation for the specific theme, as some premium themes have their own recommendations for child themes.
Do I need a lot of programming knowledge for a child theme?
For the basic setup, creating two files and having some basic CSS knowledge is enough. For more extensive template customizations, some PHP knowledge is helpful.
Where can I find more help with WordPress management?
In Tandata’s knowledge base, you’ll find more articles about WordPress, email, and domain management.
Conclusion
Creating a child theme takes little time, but saves you a lot of hassle once your theme receives an update. By correctly linking style.css and functions.php to the parent theme, you keep your customizations safe and your site stays easy to maintain.