WordPress.org

Ready to get started?Download WordPress

Forums

Mass Delete and Publish drafts (5 posts)

  1. Omegahm
    Member
    Posted 7 years ago #

    hi,
    I'm wordking on mass drafts control plugin..
    I have some questions:
    to delete draft i've to delete it from posts,post2cat,comments,postmeta

    to publish draft i'll use this SQL query:

    $post_name = sanitize_title_with_dashes($title);
    -----------SQL START------------
    UPDATE $wpdb->posts ".
    "SET post_date = '$now', post_date_gmt = '$now_gmt',post_name = '$post_name' ".
    ", post_modified = '$now' , post_modified_gmt = '$now_gmt', post_status = 'publish' ".
    " WHERE <<here i'll put drafts id>>";
    -----------SQL END------------

    IS the above right or has a problems?
    Thank you in advance..

  2. nolageek
    Member
    Posted 6 years ago #

    I'd like to do this too. Did you ever figure out the correct tables to remove drafts from? With the new tags related tables I'm not so sure anymore.

    I get a LOT of drafts using feedwordpress and I'd like to be able to remove some that match a few patterns via SQL

  3. travelvice
    Member
    Posted 6 years ago #

    Although this topic is nearly a year old, I would love to know if there's an option out there for WordPress 2.3.1 for mass-publishing of drafts...

  4. SJR
    Member
    Posted 6 years ago #

    Yep, I need this pretty bad on a public blog I operate. Anyone working on a batch publish plugin?

  5. travelvice
    Member
    Posted 6 years ago #

    I found this, which is nice...

    http://wordpress.org/support/topic/146915

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags