Advice needed for tailoring Discourse to my organisation

Hi Alexander, I’ve been working with @pfaffman on our migration to Discourse and he has been excellent, incredibly detail oriented, and a pleasure to work with.


Thank you for the recommendation!

I would strongly recommend against setting up ~250 categories. Categories are very resource hungry and an architecture that relies on hundreds of them is not sustainable long term. I’m currently working with clients to reduce their category overhead in favour of tags.

I understand that tagging enforcement involves behaviour change but that isn’t hard to drive if you message it properly.


Can you clarify exactly how many regions there are? And how many branches there are?

The issue with tags is that you cant restrict viewing of certain tags by groups. We have a similar issue in which we use a large number of categories for our model in that we have private groups of people who have access to categories. I do however want to trial it with group messaging over categories to see if that works just as well.

1 Like

Correct. Security is a category function and that is a legitimate use of categories.


At the moment we have 220 branches. This figure is not likely to change more than 10 in either direction. We’re an established organisation. We have 17 regions. Again, this is not likely to change.

Apart from the general categories, users are interested in only their branch and region. The topics contained therein will be geographically specific, and so will not be of interest to others, in general.

1 Like

Are you ok with the idea that if someone moves region they will be unable to view content from their old region?

What about if users want to share stuff cross-region?


The way I’d see it working is my magic virtual category would track their current region (and branch) but users could gain access to other regions if they wanted to.

It would be up to the moderators to move stuff to the general categories.

Good questions both!

1 Like

As @hawk pointed out, Discourse is not really optimized to have hundreds of categories. One aspect of the performance issue is that the Discourse site model loads every category when it is created (see here). So even if you achieve your desired functionality, you may find that your 250+ category instance starts slowing down and you’ll either need to modify your environment, or modify various aspects of Discourse’s server and client logic to load categories more selectively (or both).

However, with the performance issue firmly in mind, the functionality / UX you’re proposing is possible. I have done something similar to this in an ‘unreleased’ plugin (It’s here). It won’t work for you out of the box though, and it does a whole bunch of other things you don’t need. I can provide some ad hoc advice and assistance to whoever works on your version of this, but I’m not available for hire or to focus on a project like this.

If someone attempts this, what you need is:

  • User custom fields storing the region and branch category ids (cast them as integers).

  • A new /user route that allows the user to change their region and or branch (explainer text + category drop downs). e.g.

    There is a user-main-nav plugin outlet for the button and you’ll need to add a new user route.

  • A migration or some other auth logic to set the user’s initial region and branch.

  • Discovery route redirects to the region / branch categories. Probably just on the / and /categories routes, which still allows the user to visit other categories, but will direct the user to their branch / region in most instances, e.g. when they click the logo in the top left. Something like:

       redirect() {
         const user = Discourse.User.current();
         const path = window.location.pathname;
         if (path === "/" || path === "/categories") {
           DiscourseURL.routeTo('c/' + user.branch_id);

There are a few ancillary issues that you’ll face, for instance:

  • Do you want to place restrictions on when / how often a user can change their region / branch? (my implementation of this is here).

  • Do you want branch or region specific moderators? I created a separate plugin for this actually: Moderator Extension

Probably others that I’m forgetting atm.

The bottom line is that the functionality / UX you’re proposing is doable, but the performance risk is not insignificant.


It is a legit use for organizations. I have about ten world regions plus around 100 countries. Mine is easier because not many countries are currently active but I hope them to be in the future.

I also allow people to read from other countries to share knowledge, so read access is less of a concern than reply/post access.

1 Like

Thank you all for your help. Discourse is a top notch community! :smiley:

I’ll not need this; branches are assigned (and changed) by the membership system that provides the oauth.

Hundreds of categories (particularly low-hundreds) isn’t ideal but it is possible and should perform reasonably. It’s when you get to thousands of categories that it starts being a Very Bad Idea.


Luckily there aren’t that many countries in the world… :sweat_smile:

1 Like

We’re running on an AWS instance, and happy to move to a larger one as required.

1 Like

A larger aws instance will not resolve the fairly severe client implications

We send json for every category a client has access to on initial payload, categories page can get very painful, hamburger menu, category selector when creating topics and so on


Hmm, interesting.

Since the vast majority of people will only have access to one branch and region, it’s the moderators who will pay this penalty.

Time to fire up a test site, and determine the extent of the problem. A good opportunity to validate our backup procedure too :smile:


(not?) Sorry to bump revive this: how is this endeavor working for you? Is the perf bad?

1 Like

I’m afraid that due to illness, I’ve not progressed this beyond a dozen branches at the moment.