這篇教程將幫助你批量更新WordPress文章的狀態(tài)!從而避免一個一個手動更新。 SQL技巧 UPDATE wp_posts SET post_status = ‘value’ WHERE (post_type =’post’ and post_status = ‘value’) ; 其中value的值包括draft,pending和publish。 SQL實例 將所有狀態(tài)為draft的文章改為publish。SQL語句如下: UPDATE wp_posts SET post_status = ‘publish’ WHERE (post_type =’post’ and post_status = ‘draft’) ; 在phpmyadmin中運(yùn)行上面的代碼就可以了! 注意: 1. 先備份數(shù)據(jù)庫 |
|