Export WP-Discourse config?

Hi. Is there any way to export/import WP-Discourse config (as a JSON file for example)? If not, do you have some plan to do such a feature?

The plugin’s configuration is all stored in the WordPress options table, so you can access it that way. If you look at the initialize_plugin function and the discourse_option_groups array in this file https://github.com/discourse/wp-discourse/blob/master/lib/discourse.php#L184 you can see how the options are put together. It wouldn’t be too hard to write a script to initialize the options on a site by populating the arrays that are named in the discourse_option_groups array and then calling wp_update_option( $array_name, $array_values) for each of the arrays.

There are no plans to made the plugin’s configuration downloadable. If you are dealing with this, you need to be very careful about the API credentials.

5 Likes