Skip to content

Instantly share code, notes, and snippets.

@anyssa
Created July 30, 2014 18:19
Show Gist options
  • Save anyssa/06c664fb2fcc8891dd54 to your computer and use it in GitHub Desktop.
Save anyssa/06c664fb2fcc8891dd54 to your computer and use it in GitHub Desktop.
Bulk edit post dates (control posts order by date)
-- 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);
-- 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment