Created
February 14, 2018 19:39
-
-
Save misfist/b15c394fa0a5629d14b2a5e1901438b2 to your computer and use it in GitHub Desktop.
Delete posts older than X days.
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
DELETE FROM wp_posts WHERE post_type = 'post' AND DATEDIFF(NOW(), post_date) > X; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment