Top

Daily Tip: Bulk Edit of the Status Field for all Posts in WordPress Database

May 13, 2010

If you need to change the access and privacy of WordPress posts in one quick move, here’s how you can do it through the database. Open phpMyAdmin and run this query:

UPDATE wp_posts  SET post_status = 'STATUS' WHERE post_status != 'static';

Change ‘STATUS’ to either draft, private, or publish.

If you want to do this on an author-specific basis, run this one:

UPDATE wp_posts SET post_status='STATUS' WHERE post_author='NUMBER';

Replace ‘NUMBER’ with the post author’s ID and you’ll be able to bulk update the status for all posts associated with that one author.

Tweet This Post

Comments

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.