Created
November 5, 2012 02:39
-
-
Save jasperf/4014996 to your computer and use it in GitHub Desktop.
Change all Post Dates in WordPress #wordpress #posts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//DATE_ADD to add and DATE_SUB to substract. Do not forget to backup DAY and YEAR can be used as well | |
//Adjust table prefix when needed | |
//Also see http://wordpress.org/support/topic/possible-to-change-publishing-dates-of-all-posts-in-one-shot?replies=3 | |
UPDATE wp_posts | |
SET post_date = DATE_ADD( post_date, INTERVAL 12 MONTH ), | |
post_date_gmt = DATE_ADD( post_date_gmt, INTERVAL 12 MONTH ), | |
post_modified = DATE_ADD( post_modified, INTERVAL 12 MONTH ), | |
post_modified_gmt = DATE_ADD( post_modified_gmt, INTERVAL 12 MONTH ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment