Mass delete comments in wordpress?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jack Sparrow
    Almost goners..
    • May 2008
    • 11420

    #1

    Mass delete comments in wordpress?

    Is there some plugin (i know theres the phpmyadmin option to figure it out) that lets me delete ALL comments on a wordpress blog with one click?
  • Jdoughs
    Confirmed User
    • Mar 2004
    • 5794

    #2
    Originally posted by Jack Sparrow
    Is there some plugin (i know theres the phpmyadmin option to figure it out) that lets me delete ALL comments on a wordpress blog with one click?
    Never saw a plugin for it, but:

    Code:
    delete from wp_comments where comment_approved = '0'
    LinkSpun - Premier Adult Link Trading Community - ICQ - 464/\281/\250
    Be Seen By New Webmasters/Affiliates * Target out webmasters/affiliates based on niches your sites are for less than $20 a month.
    AmeriNOC - Proudly hosted @ AmeriNOC!

    Comment

    • CunningStunt
      Confirmed User
      • Aug 2006
      • 5594

      #3
      No there isn't and it's fucking ridiculous that WP doesn't have the option to do it built in.

      You have to do it via phpmyadmin - it is actually really simple to do: http://www.raymond.cc/blog/archives/...ng-phpmyadmin/

      Comment

      • Scotty.T
        Confirmed User
        • Nov 2004
        • 1062

        #4
        Not aware of a plug-in.

        I just use the bulk actions option in the comment admin page to delete them.

        Does upto 999 at a time.
        .

        Comment

        • DVTimes
          xxx
          • Jun 2003
          • 31658

          #5
          just use the built in thing.

          though i noticed you now have to pay for the activation code (it used to be free).
          XXX

          Comment

          • Scotty.T
            Confirmed User
            • Nov 2004
            • 1062

            #6
            Originally posted by DVTimes
            just use the built in thing.

            though i noticed you now have to pay for the activation code (it used to be free).
            activation code? where?
            .

            Comment

            • CaptainWolfy
              Playa
              • Dec 2005
              • 8439

              #7
              spam karma will do the trick sending all spam comment's away

              Comment

              • fris
                Too lazy to set a custom title
                • Aug 2002
                • 55679

                #8
                or

                DELETE FROM wp_comments WHERE comment_approved = ‘spam’

                if you just wanna delete spammed comments.
                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                Comment

                • DVTimes
                  xxx
                  • Jun 2003
                  • 31658

                  #9
                  Originally posted by Scotty.T
                  activation code? where?
                  Akismet

                  http://akismet.com/

                  http://en.support.wordpress.com/api-keys/
                  XXX

                  Comment

                  • fris
                    Too lazy to set a custom title
                    • Aug 2002
                    • 55679

                    #10
                    this will delete all spam, unapproved, and approved comments.

                    http://jet.li/delete-comments.zip

                    let me know if this suits you
                    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                    Comment

                    • Fbomb - BANNED FOR LIFE
                      So Fucking Banned
                      • May 2010
                      • 970

                      #11
                      Ask eastwood or marco. They should know.

                      Comment

                      • HomerSimpson
                        Too lazy to set a custom title
                        • Sep 2005
                        • 13826

                        #12
                        Make a bank with Chaturbate - the best selling webcam program
                        Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

                        PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

                        Comment

                        • fris
                          Too lazy to set a custom title
                          • Aug 2002
                          • 55679

                          #13
                          The plugin I posted deletes all comments,made it thi morning
                          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                          Comment

                          • Doug E
                            Confirmed User
                            • Sep 2005
                            • 511

                            #14
                            There is an option to show more posts per page so you can select all and delete them at once. Just click on screen options and adjust the `show on screen`figure to 10,000 or however many to cover all the spam u got and delete them all at once. I only just discovered it myself. Was a nightmare before that.

                            Comment

                            • georgeyw
                              58008 53773
                              • Jul 2005
                              • 9865

                              #15
                              Got the shits with an install this morning so made a *basic* solution for it :

                              Creates menu tab called 'Delete' - > it will delete ALL of your UNAPPROVED comments with one click.

                              Any problems with it - suck my nuts

                              Copy the code here - create a php file called 'deletecomments.php' upload to plugin folder.

                              PHP Code:
                              <?php
                              /*
                              Plugin Name: Delete Comments
                              Plugin URI: [email protected]
                              Description: Deletes ALL comments from a wordpress install.
                              Version:  1.0
                              Author: Georgeyw
                              Author URI: [email protected]
                              License: GPL1
                              */
                              
                              /*  Copyright 2010  Georgeyw  (email : [email protected])
                              
                                  This program is free software; you can redistribute it and/or modify
                                  it under the terms of the GNU General Public License, version 2, as 
                                  published by the Free Software Foundation.
                              
                                  This program is distributed in the hope that it will be useful,
                                  but WITHOUT ANY WARRANTY; without even the implied warranty of
                                  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                  GNU General Public License for more details.
                              
                                  You should have received a copy of the GNU General Public License
                                  along with this program; if not, write to the Free Software
                                  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
                              */
                              
                              add_action('admin_menu', 'delete_comments_plugin_menu');
                              
                              function delete_comments_plugin_menu() {
                                add_menu_page( "Delete Comments", "Delete", 10, "delete_comments_menu", "delete_comments_main", '',20 );
                              }
                              
                              function delete_comments_main() {
                              
                                if (!current_user_can('manage_options'))  {
                                  wp_die( __('You do not have sufficient permissions to access this page.') );
                                }
                                if($_POST['delete_hidden'] == 'Y')
                                {
                                  echo func_delete_comments();  
                                }
                                echo '<div class="wrap">';
                                echo '<div id="icon-index" class="icon32"><br /></div><h2>Delete Wordpress Comments</h2>';
                                echo '<p><strong>WARNING :</strong> Clicking on the button below will delete ALL comments from your Wordpress install.</p>';
                                echo '<p><form method="post" action="'. str_replace( "%7E", "~", $_SERVER["REQUEST_URI"]).'" >
                              <input type="submit" name="Delete" value="Delete">
                              <input type="hidden" name="delete_hidden" value="Y"> </form></p>';
                                echo '</div>';
                              
                              }
                              
                              function func_delete_comments()
                              {
                                  global $wpdb;
                                  if(isset($_POST['Delete']))
                                  {
                                      // delete unapproved comments from db
                                      $wpdb->query("DELETE FROM wp_comments WHERE comment_approved = '0'");
                                      $success = '<div id="message" class="updated fade">Successfully <b>DELETED</b> ALL Comments.</b></div>';
                                  }
                                  return $success;
                              }
                              ?>
                              TripleXPrint on Megan Fox
                              "I would STILL suck her pussy until her face caved in. And then blow her up and do it again!"

                              Comment

                              • Intrinsic
                                Confirmed User
                                • Jun 2008
                                • 1589

                                #16
                                Originally posted by georgeyw
                                Got the shits with an install this morning so made a *basic* solution for it :

                                Creates menu tab called 'Delete' - > it will delete ALL of your UNAPPROVED comments with one click.

                                Any problems with it - suck my nuts

                                Copy the code here - create a php file called 'deletecomments.php' upload to plugin folder.

                                PHP Code:
                                <?php
                                /*
                                Plugin Name: Delete Comments
                                Plugin URI: [email protected]
                                Description: Deletes ALL comments from a wordpress install.
                                Version:  1.0
                                Author: Georgeyw
                                Author URI: [email protected]
                                License: GPL1
                                */
                                
                                /*  Copyright 2010  Georgeyw  (email : [email protected])
                                
                                    This program is free software; you can redistribute it and/or modify
                                    it under the terms of the GNU General Public License, version 2, as 
                                    published by the Free Software Foundation.
                                
                                    This program is distributed in the hope that it will be useful,
                                    but WITHOUT ANY WARRANTY; without even the implied warranty of
                                    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                    GNU General Public License for more details.
                                
                                    You should have received a copy of the GNU General Public License
                                    along with this program; if not, write to the Free Software
                                    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
                                */
                                
                                add_action('admin_menu', 'delete_comments_plugin_menu');
                                
                                function delete_comments_plugin_menu() {
                                  add_menu_page( "Delete Comments", "Delete", 10, "delete_comments_menu", "delete_comments_main", '',20 );
                                }
                                
                                function delete_comments_main() {
                                
                                  if (!current_user_can('manage_options'))  {
                                    wp_die( __('You do not have sufficient permissions to access this page.') );
                                  }
                                  if($_POST['delete_hidden'] == 'Y')
                                  {
                                    echo func_delete_comments();  
                                  }
                                  echo '<div class="wrap">';
                                  echo '<div id="icon-index" class="icon32"><br /></div><h2>Delete Wordpress Comments</h2>';
                                  echo '<p><strong>WARNING :</strong> Clicking on the button below will delete ALL comments from your Wordpress install.</p>';
                                  echo '<p><form method="post" action="'. str_replace( "%7E", "~", $_SERVER["REQUEST_URI"]).'" >
                                <input type="submit" name="Delete" value="Delete">
                                <input type="hidden" name="delete_hidden" value="Y"> </form></p>';
                                  echo '</div>';
                                
                                }
                                
                                function func_delete_comments()
                                {
                                    global $wpdb;
                                    if(isset($_POST['Delete']))
                                    {
                                        // delete unapproved comments from db
                                        $wpdb->query("DELETE FROM wp_comments WHERE comment_approved = '0'");
                                        $success = '<div id="message" class="updated fade">Successfully <b>DELETED</b> ALL Comments.</b></div>';
                                    }
                                    return $success;
                                }
                                ?>
                                sweet!! i'd rep you if i could, could someone do it for me? :p

                                Comment

                                • fris
                                  Too lazy to set a custom title
                                  • Aug 2002
                                  • 55679

                                  #17
                                  mine deletes every comment on your site, approved, or unapproved, thats how the OP wanted it, but mine has a check where you have to copy and paste a line of text, just to make sure you dont do anything by accident.

                                  http://jet.li/delete-comments.zip
                                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                  Comment

                                  • georgeyw
                                    58008 53773
                                    • Jul 2005
                                    • 9865

                                    #18
                                    Originally posted by fris
                                    mine deletes every comment on your site, approved, or unapproved, thats how the OP wanted it, but mine has a check where you have to copy and paste a line of text, just to make sure you dont do anything by accident.

                                    http://jet.li/delete-comments.zip
                                    Would you like a medal?

                                    I made a basic plugin to suit my own *PERSONAL* needs and thought i'd do a quick search on gfy and post it as a reply to a topic and guess what, this was the first topic I found so I posted it.
                                    TripleXPrint on Megan Fox
                                    "I would STILL suck her pussy until her face caved in. And then blow her up and do it again!"

                                    Comment

                                    • fris
                                      Too lazy to set a custom title
                                      • Aug 2002
                                      • 55679

                                      #19
                                      Originally posted by georgeyw
                                      Would you like a medal?

                                      I made a basic plugin to suit my own *PERSONAL* needs and thought i'd do a quick search on gfy and post it as a reply to a topic and guess what, this was the first topic I found so I posted it.
                                      woah, settle down, no need to get all pissy.
                                      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                      Comment

                                      • georgeyw
                                        58008 53773
                                        • Jul 2005
                                        • 9865

                                        #20
                                        Originally posted by fris
                                        woah, settle down, no need to get all pissy.
                                        Pot Kettle - read :

                                        mine deletes every comment on your site, approved, or unapproved, thats how the OP wanted it, but mine has a check where you have to copy and paste a line of text, just to make sure you dont do anything by accident.
                                        TripleXPrint on Megan Fox
                                        "I would STILL suck her pussy until her face caved in. And then blow her up and do it again!"

                                        Comment

                                        • Intrinsic
                                          Confirmed User
                                          • Jun 2008
                                          • 1589

                                          #21
                                          Originally posted by fris
                                          mine deletes every comment on your site, approved, or unapproved, thats how the OP wanted it, but mine has a check where you have to copy and paste a line of text, just to make sure you dont do anything by accident.

                                          http://jet.li/delete-comments.zip
                                          chrismccoy your link didn't work at the time that i tried georgeyw's so :321gfy

                                          Comment

                                          • tonyparra
                                            Confirmed User
                                            • Jul 2008
                                            • 4568

                                            #22
                                            there is a delete all pending comments plugin + use that witht the bad behavior plugin that shuts down spammers before they connect with your site + wp spam free for ultra protect

                                            bad behavior is awesome on its on though

                                            High Performance Vps $10 Linode
                                            Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot

                                            Comment

                                            • fris
                                              Too lazy to set a custom title
                                              • Aug 2002
                                              • 55679

                                              #23
                                              Originally posted by Intrinsic
                                              chrismccoy your link didn't work at the time that i tried georgeyw's so :321gfy
                                              you know everyone knows my real name, so it doesnt really bother me.
                                              Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                              Comment

                                              Working...