I am digging up that thread as I would probably need such feature for admin purposes.
I've just got my forum up and running and would like to clear out all of the test topics and posts that I've published before I launch my website.
Is there an easy way to remove them completely?
Easiest way is to do that would just be selecting them all and deleting them as a mass, if you're experienced with database editing on Redir or MongoDB could also be a idea, but I'm unsure of any side effects.
@Kowlin would mass deleting them wipe them completely? For example, when I delete a particular topic and then purge it, I can still access its old URL:
The page says something like "This topic has been deleted and only authorised people can see it".
Ideally I'd like everything to be completely deleted (and the topic count reset).
I'm guessing a flushDB and re-setup is out of the question?
@BDHarrington7 I would like to keep certain things such as the categories I've created, the users registered etc.
@henrywright Ye you have to still purge them afterwards.
@Kowlin after purging, the page remains accessible if I visit the URL. It says something like "This topic has been deleted and only authorised people can see it".
@henrywright Never noticed that, think the only way would be the risky DB editing or starting from scratch.
I have the same issue. I am ready to launch the site but don't want to keep the silly test posts and topics. I want to erase them completely
@Ziggy I think there must be a way to remove posts and topics without flushing the database (wiping everything). I'd like to keep all of the config I've set up, just get rid of this test post and topic data I've been using. Any ideas?
I'll start playing with my test setup, see if I can find something besides the default delete -> Purge option.
Edit: Seems to be posible by a database editor but its a bit of a pain, I'll write a guide on it here later. I'm also unsure if this will cause any side effects. So I'll keep testing for now.
Edit 2: Purging seems to do the same and is basicly faster so please do that instead...
@Kowlin the problem with purging is it doesn't remove the topic completely. For example, after purging, go to the topic's URL. You'll see the text "This topic has been deleted and only authorised people can see it". Also, the topic ID still exists in the database.
@henrywright I've noticed that too, and the thing is it still starts calculating from where you left off. For example, after purging topic 4, NodeBB will still count the new topic as topic 5. Also I think you are just deleting the topics, after the topic is deleted theres another option for purging (See gif below)
Edit: Feel free to send me a chat if you want to communicate a little faster.
@Kowlin Thank you for the .gif, that makes things a little clearer. You can purge 2 times. The first purge results in the authorised people only message and the 2nd purge gets rid of the URL. As you say, the next topic you create will begin where you left off (topic IDs aren't recycled).
@Kowlin : how can I make such an instruction GIF? Can you recommed a tool?
ever try redis commander?
@Fastidious I think it did but can't fully remember. Soon after I wrote my last post on this topic I reinstalled from scratch (deleted
/path/to/nodebb and did
redis-cli flushall) so removing unwanted topics and posts became less of a priority.
@henrywright well, that ought to flush them all right!