How copy customizations to child theme [2025] 💥
Not to lose your customizations when upgrading your theme, a child theme should be used. But what if your theme has many customizations already and then you want to install a child theme? If you don't know how to set up a child theme then read these quick instructions on how to create a child theme and come back here.
Advertisement
1. Install a child theme
As we have a quick tutorial for this actions already, first read this short article of ours on how to set up a child theme then come back here.
2. Identify all previously made customizations
You can now add any customizations you have made to the parent theme to the child theme. You must ensure that you are able to identify any changes you made to your parent theme. WinMerge is a file comparison tool that can help you be certain. This tool allows you compare older and newer versions of theme files, and quickly identify any changes. Simply open the program and all changed files will be highlighted in red.
Kaleidoscope is available for Mac users, while Meld is available for Linux users.
Copy the highlighted files and folders of the older file to the newer one, except for the style.css and functions.php files. These files are already part of your child theme, so you'll need to change them separately.
Open both the functions.php files from the older customized version as well as the latest version of the theme files and compare them. Next, copy and paste the in pink highlighted parts from the older version into the functions.php of the child theme.
Now, the same thing has to be done for the style.css file. That's it! You have copied your customizations to your child theme.
Advertisement