Can You Export Theme Settings From WordPress Multisite?

I do local WP development on a WordPress Multisite instance. What is the best way to move theme settings from there to the live instance? By theme settings I am talking about widgets and theme options.

Related posts

Leave a Reply

3 comments

  1. Answer 1 is not the best way… it’s the old way.

    The best solution going which I have found, and use regularly for moving site from local dev to live is at http://pluginbuddy.com/purchase/backupbuddy/. It backs up everything, including databases and plugins, and lets you restore a site or migrate an entire site to a new server. You don’t even install WP on the new server because backup buddy does it all. A full migration from local to live takes about 10 minutes.

    For being able to save your widget setup to each specific theme you have under a WP install the plugin at http://wordpress.org/extend/plugins/widget-saver/ is most excellent.

  2. I’m going to assume that you’re doing things correctly, which means that you’re using register_setting() to create a single, options-array DB entry.

    Thus, assuming your Theme slug is mytheme, and your DB entry is named theme_mytheme_options, you simply need to export the following from wp_options:

    1. theme_mytheme_options
    2. theme_mods_mytheme

    Export them from the development SQL server, and then import them into the production SQL server.

    You could probably even write an exporter/importer for the process (maybe take a look at the WordPress importer Plugin as a reference?).

    EDIT

    MultiSite-specific: you’ll need to know the ID of the network site. The table name should be in the format: {network}_{siteID}_options.