Here’s a mistake that bites people: they edit their theme’s files directly, then a theme update comes along and wipes every change. The professional way to customise a theme is a child theme — a small companion theme that holds your changes safely, separate from the parent. Here’s how to create one.

Why child themes exist

When you edit a theme’s files directly, your changes live inside the theme. Update the theme, and those files are overwritten — your customisations gone. A child theme sits alongside the original (the “parent”) and overrides just the bits you’ve changed. Update the parent all you like; your child theme’s customisations survive untouched. It’s the correct way to make lasting changes.

Set up the child theme folder

In cPanel File Manager, go to wp-content/themes and create a new folder, named something like yourtheme-child. This is where your child theme lives.

Create the stylesheet

Inside that folder, create a file called style.css with a header that tells WordPress this is a child of your parent theme:

/*
Theme Name: Your Theme Child
Template: yourtheme
*/

The Template line must match the parent theme’s folder name exactly — that’s what links the two. Any CSS you add below the header overrides the parent’s styles.

Load the parent styles

Create a functions.php file in the child folder that tells WordPress to load the parent theme’s stylesheet first, then your child’s. This ensures your site still looks right, with your changes layered on top. A short enqueue function does this — the exact code depends on how the parent loads its styles, and most parent themes document the recommended snippet.

Activate it

Go to Appearance → Themes in WordPress, and you’ll see your child theme listed. Activate it. Your site should look identical to before — because the child inherits everything from the parent — but now you have a safe place for customisations.

Making changes the right way

To change a template file, copy it from the parent theme into your child folder (keeping the same name and path) and edit the copy. WordPress uses the child’s version instead of the parent’s. For style tweaks, just add CSS to the child’s style.css. Your changes now survive every parent update.

A quicker start

If creating the files by hand feels fiddly, a child-theme generator plugin builds the whole structure for you in a couple of clicks. Either way, the result is the same: a safe home for your customisations.

Child themes are one of those habits that separate a site that breaks on every update from one that doesn’t. If you want help setting one up for your specific theme, we’re glad to assist.

Was this article helpful to you?

admin

Leave a Reply

You must be logged in to post a comment.