Title: Sync plugin settings (wp_options table) on multiple environments
Last modified: August 14, 2019

---

# Sync plugin settings (wp_options table) on multiple environments

 *  [JohanvdMolen](https://wordpress.org/support/users/pixelive/)
 * (@pixelive)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/sync-plugin-settings-wp_options-table-on-multiple-environments/)
 * How do you guys handle database changes, more specifically the settings (wp_options)?
 * Im looking for something like, having a JSON file (or migration files bit similar
   like Laravel) with settings, that I can run after a deployment.
 * For example once I install WooCommerce I have a list with default settings (presets)
   I want to use and import at once. But also once I add a new feature or plugin
   that I can migrate those settings across multiple environments.
 * Would be cool if that JSON file (or settings file) is environment based. So I
   can use test payment method settings on local and live settings on production.
   And just run a command like wp migrate options or something in my deployment 
   script, which sets all the correct settings for that environment.
 * Is there something like that?
 * Thanks in advance 🙂
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsync-plugin-settings-wp_options-table-on-multiple-environments%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/sync-plugin-settings-wp_options-table-on-multiple-environments/#post-11833465)
 * My sites don’t have enough in common to be worth doing such a thing, but if they
   did, I think I’d just create custom get and set scripts just for the options 
   I’m interested in. I suspect there would be more to this than just option values,
   so it’s unlikely there would be an existing scheme to meet such specific needs.
   If it’s just you using it, it needn’t be that complicated.
 * Perhaps an array of option key names that your code loops through in constructing
   a data exchange file. JSON is a good choice. On the other end, parse through 
   the file and set options accordingly. Contain it all in a custom plugin and Bob’s
   your uncle 🙂
 *  Thread Starter [JohanvdMolen](https://wordpress.org/support/users/pixelive/)
 * (@pixelive)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/sync-plugin-settings-wp_options-table-on-multiple-environments/#post-11834008)
 * Thanks [@bcworkz](https://wordpress.org/support/users/bcworkz/).
 * Exactly what I thought, but I thought maybe something like that had already been
   made. 🙂
    -  This reply was modified 6 years, 9 months ago by [JohanvdMolen](https://wordpress.org/support/users/pixelive/).
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/sync-plugin-settings-wp_options-table-on-multiple-environments/#post-11837019)
 * You’re welcome. Doesn’t hurt to ask, or do a little searching before embarking
   on a coding project 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sync plugin settings (wp_options table) on multiple environments’ is 
closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/sync-plugin-settings-wp_options-table-on-multiple-environments/#post-11837019)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
