I am trying to delete ~40,000 topics from discourse. The method I use is programming a browser macro service https://chrome.google.com/webstore/detail/kantu-browser-automation/gcbalfbdmfieckjlnblleoemohcganoc to go to a specific search page in my Discourse site, click on then select all and click on and click on the red delete-topics button.
I play this macro in a loop so it deletes 50 posts at a time, but after a few cycles, the site crashes.
Is there a better method?
Why is deleting posts such a heavy task for the server?
They were created by a script that publishes wordpress posts that creates a matching discourse topic for every wordpress post.
Unfortunately I don’t have the knowledge how to do this in the command line, but I still think that the batch delete can be improved. For example, it lets you choose up to 1000 topics to edit/delete but it can’t handle such a task, perhaps because it tries to do them all at once. Maybe there is a way to do this more sequentially so the server can handle the load. If I could delete 1000 posts at a time, i wouldn’t have a problem doing it manually via the browser, only 40 time for 40K topics.
EDIT: I increased the server power (to 4 cpus, 4GB ram) and restarted the browser automation and it deleted everything within a couple of hours… so in case anyone reads this in the future, it is something you can do if you don’t have command line experience…