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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -