Sometimes you just want to archive everything. It’s really easy with a few simple SQL statements. I just used phpMyAdmin but you can do it directly if you want.

Examples:
Change published posts to drafts

UPDATE `wp_posts` SET `post_status` = 'draft' WHERE `post_status` = 'publish'

Inherit

UPDATE `wp_posts` SET `post_status` = 'draft' WHERE `post_status` = 'inherit'

Future(scheduled)

UPDATE `wp_posts` SET `post_status` = 'draft' WHERE `post_status` = 'future'

UPDATE
After setting every post to draft you may want to republish posts containing a certain term:

UPDATE `wp_posts` SET `post_status` = 'publish' WHERE `post_content` LIKE '%searchterm%'

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

© 2010 nukeitdotorg Suffusion WordPress theme by Sayontan Sinha