How to sync staging to production but keep plugin settings

Is there a way to sync my staging and production environments, but keep the settings for certain plugins?

For example, I am using a plugin for the Google tag manager. Each environment has a different container id, set in the plugin settings, that I don't want to be synced.

I understand that the plugin data might be saved in the wp_options table. I can't just skip syncing the table as there are parts of that table that do need to be synced between staging and production.

Topic sync staging production Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.