2014-05-29, 12:49 PM
Hi,
How do we go about a mass delete of unapproved Threads & Posts.
There is over 1 million to delete.
How do we go about a mass delete of unapproved Threads & Posts.
There is over 1 million to delete.
Mass Delete
|
2014-05-29, 12:49 PM
Hi,
How do we go about a mass delete of unapproved Threads & Posts. There is over 1 million to delete.
2014-05-29, 12:52 PM
(This post was last modified: 2014-05-29, 12:55 PM by dragonexpert.)
If you want to delete all unapproved threads, run this in PHPMyAdmin:
To delete all unapproved posts, run this query in PHPMyAdmin:
You'll need to rebuild the stats in the Admin CP after doing this.
2014-05-30, 06:50 AM
(2014-05-29, 12:49 PM)L10Group Wrote: Hi, Hi There Note: I am not a database expert. I found how to do certain things by searching the Internet and modifying the code to do what I want. Please backup your database before using these queries. I had about 8,000 posts from several spammers. After a bit of playing the following was found to work well. Run php my admin in cpanel Select database and run the following SQL query. xxxx = user name DELETE FROM mybb_threads WHERE username='xxxx '; DELETE FROM mybb_posts WHERE username='xxxx '; DELETE FROM mybb_users WHERE username='xxxx '; This will delete the user, all their posts and any threads they have created. It might take a while for a million users and would not be worth doing it this way. Another suggestion is spammers will have registered recently and most likely have a user id (uid) above a certain number. If you check the uid fields in user, you can see the spammers user id. You can run this SQL xxxx = uid number DELETE FROM mybb_threads WHERE uid >='xxxx '; DELETE FROM mybb_posts WHERE uid >='xxxx '; DELETE FROM mybb_users WHERE uid >=' xxxx ' ; You should only do this if you have no genuine users above the > number. |
« Next Oldest | Next Newest »
|