MyBB Community Forums

Full Version: How to remove users' posts / threads?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I have been looking for solution to this for a while and I can't seem to find a good one. What I've been using until now is the "Prune posts & threads" command in Banned users, but it's EXTREMELY SLOW, takes hours to remove the posts. I want something more efficient, like SQL command or something that removes them all at once. I hope someone can help.

Thanks in advance.
You could use http://mods.mybb.com/view/goodbye-spammer but you would need to individually visit a banned members profile to prune their posts/threads.

If you want a SQL command then try this (This will delete all the members from the Banned usergroup)


DELETE FROM `mybb_users` WHERE `gid`='7' 

If you want for posts as well then take a look at the link below:

http://community.mybb.com/thread-113807-...#pid842305
(2013-08-28, 05:44 AM)Zer0 Key Wrote: [ -> ]I have been looking for solution to this for a while and I can't seem to find a good one. What I've been using until now is the "Prune posts & threads" command in Banned users, but it's EXTREMELY SLOW, takes hours to remove the posts. I want something more efficient, like SQL command or something that removes them all at once. I hope someone can help.

Thanks in advance.

as this is a simple sql statement I would guess the EXTREMELY SLOW bit is down to your server can you tell us what type of server this is running on ?
(2013-08-28, 07:52 PM)Arbaz Wrote: [ -> ]You could use http://mods.mybb.com/view/goodbye-spammer but you would need to individually visit a banned members profile to prune their posts/threads.

If you want a SQL command then try this (This will delete all the members from the Banned usergroup)


DELETE FROM `mybb_users` WHERE `gid`='7' 

If you want for posts as well then take a look at the link below:

http://community.mybb.com/thread-113807-...#pid842305

I'm using this plugin but I still haven't tried it. As for the SQL command, I don't want to remove all the banned users, I just want to prune all of their posts / threads.

(2013-08-28, 10:09 PM)JimR Wrote: [ -> ]
(2013-08-28, 05:44 AM)Zer0 Key Wrote: [ -> ]I have been looking for solution to this for a while and I can't seem to find a good one. What I've been using until now is the "Prune posts & threads" command in Banned users, but it's EXTREMELY SLOW, takes hours to remove the posts. I want something more efficient, like SQL command or something that removes them all at once. I hope someone can help.

Thanks in advance.

as this is a simple sql statement I would guess the EXTREMELY SLOW bit is down to your server can you tell us what type of server this is running on ?

What kind of information you need about the server? I talked to a friend of mine and he told me the problem could be the SQL command I'm running is removing the posts page by page, which takes longer, instead of removing 100 or 200 or more posts at once. I'm not sure if that's true though.
The only other option I know is the following:

Go to ACP>Users & Groups>Banning>User Name>Prune Threads & Posts
That's what I'm using right now and it's EXTREMELY slow. That's why I'm looking for alternative solutions. Using that options, it takes 5 minutes to remove 100 posts, which is slow, because I have to remove posts from users with 10,000 posts...
That's not a MyBB problem. Perferming those operations in the DB is slow itself.
(2013-08-30, 12:12 PM)Dvdxseo Wrote: [ -> ]That's not a MyBB problem. Perferming those operations in the DB is slow itself.

If I remove a whole table, it will take less than a second, so why would removing 10k posts take hour(s)?
Any help from devs??? :/
To remove all the replies and threads of any given user do this:

1. Go to their profile and click on (Find All Threads) and delete them all, then click on ( Find All Posts) and delete them all. This is an effective and safe method.

2. Find that user thread or a reply and click on "FIND" button this will return all the threads and replies check them all and delete. Smile
Pages: 1 2 3