I’m a new Discourse user.
My installation is running fine, with no issues so far.
The type of community I am building requires a large set of categories/topics.
There’s quite a few categories I need to add and doing it manually will literally take forever.
Could someone please explain to me (in general terms) how I could add bulk categories to Discourse?
I’ve Googled and read a few topics in the Meta, but I’m still stuck and don’t know how to achieve what I need to.
Thank you for any advice or guidance,
Enjoy your day.
If you’re going to do it once, you might do it at the rails console. If you’ll need to do it frequently going forward, using the API might make more sense.
If you do a
Category.new
In rails, you’ll see what the fields are. You can then do a
I’m still learning about web development in general.
Do you possibly have a link to a tutorial on setting up rails (without breaking Discourse on the same Server). It’s an Ubuntu 20.04 Server.
Would I need to install rails and do the process?
Or do I need to use something specific to do it on the API?
I’ve never worked on an API before. It’s actually really confusing to me.
If I’m asking too much, please tell me.
I don’t want to come across as being demanding.
I am in the same boat at times. I don’t know Ruby or Rails
The data for Discourse resides in a PostgreSQL database base. It seems you have root access so you just need to get root access in the Discourse container and then let your PostgreSQL knowledge be used. If you don’t know PostgreSQL then this won’t help either.
Also you can grab a backup copy of the database at the Discourse admin page, e.g.
https://<site>/admin/backups
and do some trial runs before doing it on a production site. Don’t forget to backup the production site just before doing the SQL update.
Don’t ask me for the SQL details as I have never done this either but if you are comfortable with SQL this gives you another option.
Yes I know others will totally disagree with this but it is your site and your call.