<p>I'm not familiar with this plugin, but could probably do this in your template where the plugin is called:</p>

<pre><code>// Get the environment
{% set env = getenv('ENVIRONMENT') %}

// If anything but dev, then load the plugin
{% if env != 'dev' %}
    {% include ['_recaptcha/frontend'] %} 
{% endif %}
</code></pre>

<p>You can also get the environment from the config:</p>

<p><code>{% set env = craft.app.config.env %}</code></p>

CC BY-SA 4.0
2019-09-04T19:46:52.450Z
thanks for the reply. I know I can remove this from the front end of the website. My question was more related to the plugin settings. i.e there is an option to save responses to the database - if I wanted this on in production but off in local. The Contact Form plugin allows you to have a config file that can have different settings per env
Pedro
CC BY-SA 4.0
2019-09-04T20:30:41.393Z
Gotcha. If the plugin has override-able settings then you should be able to do this in the same way as the contact form plugin.
dmatthams
CC BY-SA 4.0
2019-09-04T11:53:25.913Z
2019-09-04T11:53:25.913Z
dmatthams
<p>Hi I am using Craft CMS with the project config file to keep various environments in sync. This generally works fine but I have run into an issue with plugin settings.</p>

<p>I am using the Contact Forms Extension and want to use the reCaptcha on my production site but I want it disabled locally. If I enable it on my production site, it gets disabled every time I deploy as I have it disabled locally.</p>

<p>Is there anyway I can create a plugin settings config to override the project config file?</p>

CC BY-SA 4.0
2021-11-29T07:23:33.090Z
Yeh I am finding it a common thing to have plugins locally that are really personal, convenience plugins (eg verbb/cp-nav) - annoying that it isn't easy to stop project config changes from these types of plugins wanting to always propagate to shared repos/deployment servers.
bhu Boue vidya
<craft3><plugins><projectconfig><project.yaml>
Craft CMS Project Config file override
# Craft CMS Project Config file override

(Asked by: username_0 on 2019-09-04)

Hi I am using Craft CMS with the project config file to keep various environments in sync. This generally works fine but I have run into an issue with plugin settings.

I am using the Contact Forms Extension and want to use the reCaptcha on my production site but I want it disabled locally. If I enable it on my production site, it gets disabled every time I deploy as I have it disabled locally.

Is there anyway I can create a plugin settings config to override the project config file?

**Tags:** craft3, plugins, projectconfig, project.yaml

> **Comments:**
> **username_1**: Yeh I am finding it a common thing to have plugins locally that are really personal, convenience plugins (eg verbb/cp-nav) - annoying that it isn't easy to stop project config changes from these types of plugins wanting to always propagate to shared repos/deployment servers.  

---

## 1 answers

### Answer by username_2 on 2019-09-04. Score: 2

I'm not familiar with this plugin, but could probably do this in your template where the plugin is called:
// Get the environment
{% set env = getenv('ENVIRONMENT') %}

// If anything but dev, then load the plugin
{% if env != 'dev' %}
    {% include ['_recaptcha/frontend'] %} 
{% endif %}

You can also get the environment from the config:
{% set env = craft.app.config.env %}

> **Comments:**
> **username_0**: thanks for the reply. I know I can remove this from the front end of the website. My question was more related to the plugin settings. i.e there is an option to save responses to the database - if I wanted this on in production but off in local. The Contact Form plugin allows you to have a config file that can have different settings per env  
> **username_2**: Gotcha. If the plugin has override-able settings then you should be able to do this in the same way as the contact form plugin.  

---

