I am wondering if it is possible to export theme customizer settings(theme_mods) to be imported into another install of the same theme. I know that the settings are saved into the database so I am wondering if there is a plugin or tool to create a XML file for import like many themes have for settings.
3 comments
Comments are closed.
For anyone still interested in customizer export/import functionality, we just released a new plugin on the wordpress.org repo that does exactly that!
https://wordpress.org/plugins/customizer-export-import/
Don’t hesitate to let us know what you think!
Theme mod settings are stored as a single database entry in the options table.
For example, If I look in my
wp_options
table in a localhost install, and find the key oftheme_mods_twentythirteen
, then this is the content of it:That’s just saving the header image and colors and such for the twentythirteen theme. Copy that to another install and you copied all the theme mod settings for that theme.
I did a small research on the matter. It seems that the only way right now would be to import manually from database. This is the case with native settings now. The problem might be that every theme can have different option-fields in customizer. Meaning that the theme should probably always handle this kind of import/export or optionally a plugin.
I also found a promising plugin called Customizer which promises to edit, save, import and export theme customizer options in the future.