Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to delete or empty 50000 spam replies and topics


  • rajaindian
    Participant

    @rajaindian

    Hi, I have got 50000 replies in spam and I get 504 timeout error when i try t empty the spam. Is there a way to do this from the back-end or by downloading the relevant table cleaning it and uploading it. Or using phpmyadmin or any other way that I wont get this error?

Viewing 18 replies - 1 through 18 (of 18 total)

  • Robin W
    Moderator

    @robin-w

    I TAKE NO RESPONSIBILITY FOR WHAT FOLLOWS !!!

    BACKUP YOUR DATABASE FIRST !!

    see

    Remove post_status Spam Posts from WordPress

    but this should do it

    DELETE FROM wp_posts WHERE post_status = "spam"

    It will not get rid of post meta for these.


    rajaindian
    Participant

    @rajaindian

    Hi, this will not work as the post meta is bigger and that must be cleaned. Is there some way to simulate the empty spam button through a sql query so that the post and post meta all get deleted.


    vitabuminaksamala
    Participant

    @vitabuminaksamala

    I also encountered the same issue, beg for solutions.


    Robin W
    Moderator

    @robin-w

    How about this?

    https://en-gb.wordpress.org/plugins/wp-mass-delete/

    you would want a post status of spam

    I haven’t tried it.

    PLEASE come back and tell us if it works


    rajaindian
    Participant

    @rajaindian

    Hi, it doesn’t have the post status as spam option. These are the only status available –
    published – scheduled – pending – draft – private


    Robin W
    Moderator

    @robin-w

    I’ve posted in his support page to ask if he can add that type. If he doesn’t then I’ll look to cut a version for you in the new year


    rajaindian
    Participant

    @rajaindian

    Hi @robin-w any update on this, I am still stuck with the spam posts


    Robin W
    Moderator

    @robin-w

    no reply from the support site – give me a few days and I’ll see if I can find some time to look at this


    Robin W
    Moderator

    @robin-w

    @rajaindian – I have done some coding, but do you have the ability to test this first on a test site to make sure it works?


    rajaindian
    Participant

    @rajaindian

    @robin-w yes I can test it


    John James Jacoby
    Keymaster

    @johnjamesjacoby


    Stephen Edgar
    Keymaster

    @netweb


    Robin W
    Moderator

    @robin-w

    @rajaindian – great let me cut a version for you – I’ll do a minimum of testing and then come back


    Robin W
    Moderator

    @robin-w

    ok, so do the following

    1. If you have WP mass delete already installed then deactivate and delete

    2. the go to

    WP Mass delete bbpress version

    and download the plugin to your PC

    Then go into Dashboard>plugins>add new and upload plugin

    then upload the file you downloaded, and then activate

    To execute go into Dashboard>settings>WP mass Delete, and choose the options with care !!!

    I would suggest you tick Bypass trash, as otherwise you’ll only get them in there instead !!

    The plugin works by using a sql command to make an array of post ID’s needing deleting, and then using wp_delete_post command to do each one in turn, which will pick up post meta and revisions as well, and cycling through the array.

    Given you have 50,000 it may well error as well, so I’d suggest you start by limiting the period to a) check that it is working !
    b) give it something that it might succeed at.

    Once you know it works, you can try a full dump, but it may fall over.

    If it does, then limiting to a period should let you delete a good size chunk each time, so hopefully in a couple of dozen iterations you should be able to get there.

    Please come back and let me know how you get on – I can play with it a bit more if needed


    rajaindian
    Participant

    @rajaindian

    hi, i am able to delete the spam replies one or two months at a time. thank you so much for your help!


    Robin W
    Moderator

    @robin-w

    Great – glad it works !!


    senatorman
    Participant

    @senatorman

    Great plugin, but there is no option to remove specific forums or topics.

    i mean:
    can i remove also complete forums with related topics and post in one time by forumname (slug)

    And

    Remove topic with related posts by name (slug)

    when you can make this, this is a perfect complete tool for every bbpress owner


    Robin W
    Moderator

    @robin-w

    I wasn’t planning to make this a permanent tool, just trying to help rajaindian out.

    I’ll think about whether to develop it further, but it won’t be soon, 6 other plugins and my proper job keep me busy !

Viewing 18 replies - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.
Skip to toolbar