# Importer SiteSettings recommendations

**URL:** https://meta.discourse.org/t/importer-sitesettings-recommendations/70542
**Category:** Development
**Created:** [September 21, 2017, 10:58pm UTC](https://meta.discourse.org/t/importer-sitesettings-recommendations/70542 "2017-09-21T22:58:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 21, 2017, 10:58pm UTC](https://meta.discourse.org/t/importer-sitesettings-recommendations/70542/1 "2017-09-21T22:58:25Z")

</div>

I’ve done several imports recently and find it helpful to include these SiteSettings:

```ruby
    SiteSetting.disable_emails = true
    SiteSetting.login_required = true
    SiteSetting.allow_index_in_robots_txt=false
    SiteSetting.title = "Legacy Forum Name import"

```

In case it’s not clear:

- I live in fear of uploading some uploading a demo import to someone and having Discourse send out a zillion emails.
- I live in fear of having someone’s not-ready site show up in Google (he wasn’t very happy!)
- Having a title makes it a tiny bit easier to guess which backup I’m looking for.

Unless someone says not to, I’m going to include these in future PRs when I make improvements to importers.

### deactivate\_all\_users

This is along the same lines, and I’ll throw it in here rather than start another thread.

Also handy is a function to deactivate all users so that if you do want to make a site functional enough to log in but don’t want a bunch of people getting emails. (And yeah, that happened too. ☹)

It it OK to submit a PR with this in `base.rb`? That’ll keep me from adding it to every importer I touch.

```ruby
  def deactivate_all_users
    User.where("active = true and admin != true").update_all(active: false)
  end

```

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [September 24, 2017, 7:05am UTC](https://meta.discourse.org/t/importer-sitesettings-recommendations/70542/2 "2017-09-24T07:05:57Z")

</div>

Seems fine to me 👍
