Forums

Auto Delete Posts
[resolved] Huge number post delete (3 posts)

  1. Tungttt
    Member
    Posted 1 year ago #

    Sometime you can't get enough resource to delete all post at one time.
    So I fix the code to check 20 post at one time.
    open auto-delete-posts.php and find line 398 (gen_query())

    if (DEL_PUB_POSTS == $this->settings['DelPostType']) {
    				$post_status = 'publish';
    				if ((count($this->settings['DeleteCategory']) == 0) &&
    		   			($this->settings['MoveCategory'] == '0') &&
    		    		($this->settings['AddCategory'] == '0')) {
    		  				echo "No category selected for Delete, Move or Add actions. Unable to preview any posts.";
    		 		} else {
    		  			$catArray = $this->settings['DeleteCategory'];
    
    		  			$getpost_args = 'numberposts=20&category=';
    		  			for ($i = 0; $i < count($catArray); $i++) {
    		    			$getpost_args .= $catArray[$i];
    		    				if ($i+1 != count($catArray))
    					      		$getpost_args .= ',';
    					}
    				}
    			} else {
    				$post_status = 'draft';
    				$getpost_args = "numberposts=-1&post_status='$post_status'";
    			}
    			$getpost_args .= '&order=ASC&orderby=date';

    http://wordpress.org/extend/plugins/auto-delete-posts/

  2. crypted
    Member
    Posted 1 year ago #

    tried this, the post.php would hang and end up blank. Does this replace the whole function or what?

    I have 60,000 posts and need to delete around 15,000 for being older than one year.

  3. crypted
    Member
    Posted 1 year ago #

    Apparently, this happens when Ben's Translator is in use. So, it seems that it tries to translate everything again or something.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic