Title: Disabling posts by date
Last modified: August 18, 2016

---

# Disabling posts by date

 *  [cookiedude](https://wordpress.org/support/users/cookiedude/)
 * (@cookiedude)
 * [19 years, 12 months ago](https://wordpress.org/support/topic/disabling-posts-by-date/)
 * 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)

 *  [bluegator](https://wordpress.org/support/users/bluegator/)
 * (@bluegator)
 * [19 years, 12 months ago](https://wordpress.org/support/topic/disabling-posts-by-date/#post-403805)
 * 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](https://wordpress.org/support/users/cookiedude/)
 * (@cookiedude)
 * [19 years, 12 months ago](https://wordpress.org/support/topic/disabling-posts-by-date/#post-403808)
 * 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.

## Tags

 * [archives](https://wordpress.org/support/topic-tag/archives/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [cookiedude](https://wordpress.org/support/users/cookiedude/)
 * Last activity: [19 years, 12 months ago](https://wordpress.org/support/topic/disabling-posts-by-date/#post-403808)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
