• I went looking for something in my archives and came across a whole lot of posts that I’d rather mark private instead of public now. I guess a quick and dirty way to achieve this would be to go into the database and run some SQL query on the table in question a la “switch status to private on all posts older than x” – how do I say this in MySQL? ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Something like this:

    Update wp_posts set post_status = ‘private’ where post_date < ’01/01/2006 00:00:00′

    NOTE: It’s not a very good idea to go poking around MySQL, particularly if you are unfamiliar with it. I make no guarantees as to the correctness of the above in terms of syntax, I haven’t actually run it, but I’m reasonably sure it will work. If it breaks something, it’s not my fault, please don’t blame me: I’m just pointing you in a direction.

    Thread Starter cookiedude

    (@cookiedude)

    I used to do a bit of mysql as part of my job training, so I’m kind of familiar with what I need to do, it’s just I wasn’t sure of the date syntax for mysql anymore ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disabling posts by date’ is closed to new replies.