Archiving Discourse into a Website

Hi all!

I’ve had a forum running for over a decade and over time it has lost relevance. The topic around what the forum was built served its purpose.

I’ve financially sponsored hosting over the years but I wonder what is a good way to convert the forum to more of a regular site. I’d love to change the forum to read only but there are some hosting costs that I need to cover associated to hosting discourse on a third party service. It doesn’t make much sense to keep the full forum going.

Wondering if there is a way I can download the DB and create a static site out of it.

Thanks for the suggestions!

There are several discussions about this. Most of them redirect to A basic Discourse archival tool

There’s also Any updates on the best way to create a HTML archive of a static site?

I don’t know if the tools provided in those still work.

2 Likes

Here’s how I’ve done it before.

If you want to keep PMs too (probably a bad idea if you’re making this public!)

Consider moving PMs to a category like:

c=Category.create(title: pms) # TODO: and stuff to make it private
pms=Topic.where(archetype: "private_message", subtype: "user_to_user")
pms.update_all(category_id: c.id, archetype: "regular")

Paste this to assign the cookie to COOKIE and then paste the cookies copied to clipboard by the Cooke Chrome extension.

COOKIE=$(cat |jq -r '.[]|select(.name == "_t")|.value')

enter the URL here:

then paste:

wget --mirror --page-requisites --convert-links --adjust-extension --compression=auto --reject-regex "/search" --no-if-modified-since --no-check-certificate --execute robots=off --random-wait --wait=1 --user-agent="Googlebot/2.1 (+http://www.google.com/bot.html)" --no-cookies --header "Cookie: _t=$COOKIE" =FORUMURL=

If you’ve got a budget and need more help, my contact info is in my profile.

1 Like