Copy customizer options to child theme

Definitely backup your database FIRST before trying this out.

I just tested changing the option_name of a set of customizer changes to match a different theme, and it appears we can make the customizer changes switch to another theme simply by changing the option_name to match our new theme, instead of copying the option_value serialized data over. I didn’t have a child theme handy to test this, but the premise is the same.

First, using your favourite DB editor find the option for theme_mods_myChildTheme in your options table, and change the option_name to something like theme_mods_myChildTheme-backup, then you can easily switch back to this if you need to.

Next find the option for theme_mods_ocean, and edit the option_name to be theme_mods_myChildTheme.

Finally go visit the Appearance >> Customize page in your child theme, and you should see all the customizer option values from your parent theme are set there now. Keep in mind this means these values are no longer set for your other theme.

Leave a Comment