Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Can I +1 this suggestion? This would be incredibly useful –  user1134053 Feb 7 at 14:20
add comment

2 Answers

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 of "theme_mods_twentythirteen", then this is the content of it:

 a:3:{s:16:"header_textcolor";s:6:"220e10";s:12:"header_image";s:84:"http://localhost/wptrunk/wp-content/themes/twentythirteen/images/headers/diamond.png";s:17:"header_image_data";a:3:{s:3:"url";s:84:"http://localhost/wptrunk/wp-content/themes/twentythirteen/images/headers/diamond.png";s:13:"thumbnail_url";s:94:"http://localhost/wptrunk/wp-content/themes/twentythirteen/images/headers/diamond-thumbnail.png";s:11:"description";s:7:"Diamond";}}

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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