Created
July 30, 2014 18:19
-
-
Save anyssa/06c664fb2fcc8891dd54 to your computer and use it in GitHub Desktop.
Bulk edit post dates (control posts order by date)
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
| -- Bulk edit post dates (reverse order of posts) | |
| UPDATE wp_posts SET post_date = DATE_ADD( FROM_UNIXTIME(UNIX_TIMESTAMP('2014-01-01 12:00:00')),INTERVAL -id HOUR); |
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
| -- Bulk edit post dates (reverse order of posts) | |
| UPDATE wp_posts SET post_date = DATE_ADD( FROM_UNIXTIME(UNIX_TIMESTAMP('2014-01-01 12:00:00')),INTERVAL id HOUR); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on: