I am using the OceanWP theme and customized it with the WordPress Customizer feature. Then, I created a child theme based on OceanWP, because I introducted some new shortcodes and did not want to alter the base theme. Unfortunately, when I switch themes, all my customization is lost.

I know that the customization is stored in the WordPress options table. I found theme_mods_ocean and copied the content to theme_mods_myChildTheme. I can store the changes, but as soon as I reload the blog, the database entry is reverted to its initial value.

How is this possible? Is there any other place where the customization is saved and restored from? I do not want to re-configure the entire child theme, if possible.

  • WordPress doesn't store theme mods anywhere else, but can't be sure that your parent theme doesn't. Does myChildTheme, where you've copied the database row, match the folder name of your child theme exactly? Commented Aug 25, 2017 at 12:12
  • Yes, it does. WordPress created that entry anyway, so the name should be correct. Commented Aug 25, 2017 at 12:42
  • 1
    Does this answer your question? Preserving theme settings in child theme
    – Melebius
    Commented Apr 16, 2021 at 8:22

3 Answers 3


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.

  • 1
    This did not work for me
    – Eoin
    Commented Nov 24, 2017 at 11:41
  • 1
    This approach worked for me. I simply went to wp_options table, found the record with the field option_name set to theme_mods_parent, copied the text found in option_value to the record with the field option_name set to theme_mods_child. Of course you have to replace parent and child with the actual names of your themes. Commented Apr 10, 2019 at 11:09
  • 2
    There's a better option over at wordpress.stackexchange.com/a/277994
    – Arie
    Commented May 18, 2020 at 18:29

I was able to export and import the Customizer settings using this Plugin : Customizer Export/Import (Version 0.9.1 | By The Beaver Builder Team). https://en-ca.wordpress.org/plugins/customizer-export-import/

It works like a charm and is safer than the database manipulation method.


This is the weak point of Customizer vs Child Themes. All Customizers options are stored in the db and they are meant to be used with the original theme. If you switch to another theme (i.e. your child theme), the options remain bound to the original one.

As an option, you should deeply study the content of your options table theme_mods for the original theme, an try to "translate" them into your child style.css (whenever possible.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.