Forums

Make all posts private (7 posts)

  1. Anonymous
    Unregistered
    Posted 7 years ago #

    I have a site and want to make the entries up until now private. Then I'll make posts as usual and they'll be the only ones that appear until a few months down the track where I'll make all the private posts public again. What command would I have to run in phpmyadmin to make them all private, and then in the future make them all public again?
    Cheers.

  2. midori
    Member
    Posted 7 years ago #

    UPDATE yourprefixfortables_posts SET post_status = 'private' and the reverse: same, but = 'publish'

  3. midori
    Member
    Posted 7 years ago #

    btw, there are many many informations here: http://dev.mysql.com/doc/mysql/en/index.html

  4. major
    Member
    Posted 7 years ago #

    Cool, just to make sure I have this 100% correct - mine would look like this with a table prefix of 'wp':
    UPDATE wp_posts SET post_status = 'private'

  5. tiiimmt
    Member
    Posted 6 years ago #

    I just tried the reverse (ie publish) and PMA gave me an error.

    "You have to choose at least one column to display"

    I don't get it. Why won't PMA allow me to insert a simple query?

  6. James
    Happiness Engineer
    Posted 6 years ago #

  7. tiiimmt
    Member
    Posted 6 years ago #

    I don't see how this is useful when all I want to do is have a query set all my posts status to publish.

    I have no idea why this doesn't work:
    UPDATE wp_posts SET post_status = 'publish'

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.