mysql - Wordpress SQL Command to Set all posts by author John Doe to draft -
i'm importing posts site. i've set posts specific author (john doe in case) , want run sql query (in phpmyadmin) gets john's posts , sets them draft. ideas?
assuming database schema same 1 found here, accomplish following query:
update wp_posts inner join wp_users on wp_posts.post_author = wp_users.id set wp_posts.post_status = 'draft' wp_users.user_login ='john doe' , wp_posts.post_type ='post'
if know userid of "john doe" can use
update wp_posts set post_status = 'draft' post_author =12345 , post_type ='post'
you may want see support topic @ wordpress
Comments
Post a Comment