Skip to content

Instantly share code, notes, and snippets.

@anyssa
Created July 30, 2014 18:19
Show Gist options
  • Select an option

  • Save anyssa/06c664fb2fcc8891dd54 to your computer and use it in GitHub Desktop.

Select an option

Save anyssa/06c664fb2fcc8891dd54 to your computer and use it in GitHub Desktop.

Revisions

  1. anyssa created this gist Jul 30, 2014.
    2 changes: 2 additions & 0 deletions Reverse order of all posts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    -- 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);
    2 changes: 2 additions & 0 deletions Set date by post ID
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    -- 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);