Do I need to update the child theme too after updating the parent?

As you mentioned, a child theme is designed exactly for the purpose of not losing your changes upon updating the parent theme.

Updating the child theme is not always mandatory, however there might be cases that you should do so.

Consider this: You update the parent, and the update removes some of core functions, which you use in the child theme. If you do not update your child theme too, you will receive a fatal error, since the function doesn’t exist anymore.

The best practice would be to read the change logs of the parent theme before you update it, and take proper actions before you update it. You might need to remove part of your child theme, add or edit its code, or nothing at all. It really depends on the parent theme’s update. Pay attention to errors in PHP error log, and watch out for deprecation and notices.

A Quick Example

The parent declares a function that accepts 2 parameters in the following way:

function some_function( $object, $string ) { ... }

After the update, it’s changed to this:

function some_function( $object, $object, $string ) { ... }

Now, if you are using this function in your child theme, doing the update will trigger an error, since you will be passing a string as an object.

Leave a Comment