UPDATE `wp_posts` SET `post_date` = DATE_ADD(‘2014-1-01’, INTERVAL ROUND(RAND() * 500 + 1) DAY) WHERE `ID` between 6297 AND 14332;
update `wp_posts` set `post_modified` = `post_date` WHERE `ID` between 6297 AND 14332;
update `wp_posts` set `post_date_gmt` = `post_date` WHERE `ID` between 6297 AND 14332;
update `wp_posts` set `post_modified_gmt` = `post_modified` WHERE `ID` between 6297 AND 14332;
update `wp_posts` set `post_status` = ‘publish’ WHERE `ID` between 6297 AND 14332
自己修改好起始时间 “2014-01-01” 、随机日期范围 “500 天” 、文章 ID 范围起始 ID 6297 结束 ID 14332 修改为你自己的
然后依次执行以上 SQL 语句即可,可以随机生成 ID 范围内的文章的发布日期