Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Prevent plugins from generating environment-specific configs?

Solved by paul View solution

Started by paul 6 years ago · 1 replies · 824 views
6 years ago

I'm developing locally and using local and staging environment configs. When I make changes to plugin settings through the admin panel while working in, say, localhost, the plugin saves its settings in user/localhost/config/plugins.

I realize that's expected behavior, but is there any way to force them to save to the global config?

6 years ago Solution

Ok, I think I answered my own question.

Be sure the user level config is correct then delete the environment level config:
user/localhost/config/plugins/some-plugin.yaml

Then use a relative symlink (previous version of this post did not use relative symlinks) to point the environment config to the user level config. For example, if the environment is localhost, starting from grav root:

cd user/localhost/config/plugins
ln -s ../../../config/plugins/some-plugin.yaml some-plugin.yaml

last edited 09/22/20 by paul

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 225 8 hours ago
Support · by alex, 2 months ago
8 666 23 hours ago
Support · by Supple, 5 days ago
1 97 1 day ago
Support · by TomW, 1 week ago
3 158 3 days ago
Support · by TomW, 6 days ago
2 105 5 days ago