My website does not have a child theme

“My website doesn’t have a Child Theme” is probably the most feared words professional WordPress developers can hear, but sadly we hear it a lot!

Many WordPress website owners don’t realise the importance, until they update their theme and lose all their customisations.

What does a child-theme do and why is it so important?

The long version of the answer is on this link, but below is the short version.

WordPress Child Theme is a dummy theme that references your website to the main/original theme, which allows you to implement all your customisations on the Child Theme rather than the original theme. This allows you to protect all your customisation from being wiped out during Theme Upgrade. Without it, if you upgrade your theme to the latest version, all your customisations will disappear as they are overwritten by the new version of the theme.

How can I create WordPress Child Theme?

This is pretty simple when you first set up your website, but a lot more complex to do it after the event.

  1. When setting up a brand new WordPress website, it is very easy to create a Child Theme. You can either download plug-ins that do the work for you (e.g. for an example click here ).
  2. Alternatively you can create it yourself if you fancy some coding by clicking on our article here!

How can I create a Child theme retrospectively?

This is a little more complex, specially if you have any CSS customisation (styling), or functionality that has been added to your original theme.

This requires detective work, and the more complex changes, the more work you have to do.

The principal is simple:

  1. Create a Child Theme (manually or using a plug-in)
  2. Find out what has been changed on your websites
  3. Copy it to your Child Theme

Easier said than done, as finding all changes is not as easy as people think.

Finding styling changes in your CSS file is relatively easy, but if there is custom code or functionality, then it is much harder.

In both cases you need to take these additional steps:

  1. Download the original theme
  2. Install it on your website
  3. Rename it as “New” so you can identify it easily
  4. Compare the files and CSS of the New Theme that you have installed to your live theme
  5. Copy the changed files to your Child Theme
  6. Rename the live theme to “Old”
  7. Rename the New Theme by removing “New” from the name
  8. Activate the Child Theme
  9. Check that everything works as expected (if it does not behave as you expect, you need to check the old theme again)
  10. Delete the old theme

As you can see, it sounds simple enough, but then again it isn’t as easy as it sounds, and in some cases very time consuming.

Summary

As the old adage goes, do it right or do it twice! If you set up your WordPress website correctly with a Child Theme from day one, then it is a very easy process and will save you hours of work and costs if you have to get someone to fix it for you.

If Child Theme was not set up in the first place, it is worth going through the pain and costs, as not doing it could prove to be even more costly in the long run. If your customisation is overwritten by your theme upgrade, you cannot recover the changes unless you have a back up of your website so that you can restore the site back and start the above process.

In complex cases, we recommend you use a professional as trying to do this yourself after the event, can become frustrating and time consuming. Contact us and we can help you set up your WordPress website correctly.