Theme is child and parent

How To Update WordPress Theme With A Child Theme

Updating a WordPress theme that has a child theme can be either simple or a total nightmare.

Which it is depends on what kind of child theme you’re dealing with, and what kind of customizations have been made.

Custom child theme specific to your site

If you created your own child theme that’s unique to your site (i.e. it’s not maintained and updated by a 3rd party), then updating your theme is normally straightforward. You simply update the main theme as and when it needs updating. Your child theme mostly uses that parent themes code and css anyway, so changes will instantly apply.

The only complication here is if your child theme overrides and customizes template files from the parent (i.e. anything but styles.css and functions.php). This can result in conflicts because any changes to those files in the parent theme will be ignored by your child theme. This can mean new features are not added to your site or it can completely break your site because e.g. a function in your changed file no longer exists. The only way to manage this is to manually compare the changes and retrofit your changes to the updated files.

How To Update A WordPress Theme Without Losing Settings

When is a child theme not a child theme?

Some big themes (or theme frameworks) come with pre-built child themes, or have extra child themes you can buy to customize the main theme. This is becoming less common with the popularity of WordPress page builder plugins, but lots of older sites still use these themes.

The problem with these pre-built child themes is what do you do if you need to further customize that child theme? Creating a ‘grandchild theme’ sounds like the right way to go here, but that concept doesn’t exist in WordPress.

There are ways to avoid or at least minimize this problem.

How To Keep Your Website Up To Date For Small Business

If it’s just a CSS change then add it to WordPress customizer (under Additional CSS) which means no theme files need to be changed at all. If it’s something you would normally put in functions.php then your best option is to create a custom plugin if possible. This works well for lots of requirements but will often depend on what hooks have been made available in the main theme.

The final (and last resort) option is to make changes directly in the child theme folder. This instantly creates a maintenance problem though as you will need to reapply and merge in your changes every time the child theme is updated. It might be possible to create custom page/post templates to minimize this (depending on the changes) – but these files will get deleted on a child theme update so will still need to be added back in.