GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Mass delete comments in wordpress? (https://gfy.com/showthread.php?t=989703)

Jack Sparrow 09-28-2010 10:29 PM

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 09-28-2010 10:33 PM

Quote:

Originally Posted by Jack Sparrow (Post 17550492)
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'

CunningStunt 09-28-2010 10:34 PM

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/

Scotty.T 09-29-2010 03:18 AM

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.

DVTimes 09-29-2010 03:22 AM

just use the built in thing.

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

Scotty.T 09-29-2010 03:29 AM

Quote:

Originally Posted by DVTimes (Post 17550858)
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?

CaptainWolfy 09-29-2010 03:44 AM

spam karma will do the trick sending all spam comment's away :)

fris 09-29-2010 04:03 AM

or

DELETE FROM wp_comments WHERE comment_approved = ‘spam’

if you just wanna delete spammed comments.

DVTimes 09-29-2010 04:09 AM

Quote:

Originally Posted by Scotty.T (Post 17550864)
activation code? where?

Akismet

http://akismet.com/

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

fris 09-29-2010 05:08 AM

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

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

let me know if this suits you

Fbomb - BANNED FOR LIFE 09-29-2010 05:53 AM

Ask eastwood or marco. They should know.

MrBottomTooth 09-29-2010 06:22 AM

Ya, if you haven't activated Askimet yet, do it. I am surprised how well it works. Has basically eliminated 100% of the spam comments I used to get.

HomerSimpson 09-29-2010 06:36 AM

Quote:

Originally Posted by DVTimes (Post 17550919)

:2 cents::thumbsup:thumbsup

fris 09-29-2010 12:42 PM

The plugin I posted deletes all comments,made it thi morning

Doug E 09-29-2010 01:08 PM

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.

georgeyw 10-12-2010 07:27 PM

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 :thumbsup

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;
}
?>


Intrinsic 10-12-2010 07:42 PM

Quote:

Originally Posted by georgeyw (Post 17601077)
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 :thumbsup

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

fris 10-12-2010 08:07 PM

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

georgeyw 10-12-2010 08:18 PM

Quote:

Originally Posted by fris (Post 17601160)
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.

fris 10-12-2010 08:24 PM

Quote:

Originally Posted by georgeyw (Post 17601177)
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.

georgeyw 10-12-2010 08:34 PM

Quote:

Originally Posted by fris (Post 17601191)
woah, settle down, no need to get all pissy.

Pot Kettle - read :

Quote:

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.

Intrinsic 10-12-2010 08:38 PM

Quote:

Originally Posted by fris (Post 17601160)
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

tonyparra 10-12-2010 08:40 PM

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

fris 10-12-2010 08:44 PM

Quote:

Originally Posted by Intrinsic (Post 17601234)
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.


All times are GMT -7. The time now is 03:55 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc