• Is it possible to change the publishing dates of all the posts by a increment of certain number of months/days in one shot?

    Let’s say there are 3 posts in my WP and their publishing dates are
    2009/03/03, 2009/03/04 and 2009/03/05 (yyyy/mm/dd) format. Is there a query in phpMyAdmin or a plugin that I can use to change the above dates by say, 9 months to make them current so they become 2009/12/03, 2009/12/04 and 2009/12/05?

    Would like the same to work for Pages as well, if possible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Backup your database.

    In phpMyAdmin use this:

    UPDATE wp_posts
    SET post_date = DATE_ADD( post_date, INTERVAL 9 MONTH ),
    post_date_gmt = DATE_ADD( post_date_gmt, INTERVAL 9 MONTH ),
    post_modified = DATE_ADD( post_modified, INTERVAL 9 MONTH ),
    post_modified_gmt = DATE_ADD( post_modified_gmt, INTERVAL 9 MONTH )

    If your posts table is not wp_posts, use your table name.

    If increasing the date 9 months results in ‘future date’ beyond today don’t expect those posts to be ‘republished’.

    Thread Starter Sridhar Katakam

    (@srikat)

    Thanks Michael, that worked.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Possible to change publishing dates of all posts in one shot?’ is closed to new replies.