# How to change a site setting via the Console

**URL:** <https://meta.discourse.org/t/how-to-change-a-site-setting-via-the-console/32761>\
**Category:** Product Support\
**Created:** [August 31, 2015, 9:29pm UTC](https://meta.discourse.org/t/how-to-change-a-site-setting-via-the-console/32761 "2015-08-31T21:29:26Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![Dannii](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dannii/32/129087_2.png) [@Dannii](https://meta.discourse.org/u/Dannii)\
**Post date:** [September 12, 2019, 4:01am UTC](https://meta.discourse.org/t/how-to-change-a-site-setting-via-the-console/32761/17 "2019-09-12T04:01:57Z")

</div>

I believe a setting regex needs updating, and want to test with a new value, but when I go `SiteSetting.key = value` it blocks me because of the regex. Is there a way to force update a value even if it doesn’t match the setting’s regex?

Edit: this worked, though be very careful!

```plaintext
cd /var/discourse/
./launcher enter app
rails db
discourse=> update site_settings set value='newvalue' where name='settingname';

```

And then exit out, and restart the app:

```plaintext
./launcher stop app
./launcher start app

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-change-a-site-setting-via-the-console/32761)._
