Wordpress Database Help Needed

Discussion in 'WordPress' started by glenv, Oct 12, 2008.

  1. #1
    Don't ask me how but I was just looking in my admin panel for one of my wordpress sites and I discovered I had about 160 articles that somehow ended up unpublished. I think one of the knockleheads I hired many months ago to help did it and never fixed it. I started to publish each but its going to take forever.

    Does anyone know a MySQL command that will publish all unpublished articles? Please keep in mind I am VERY inexperienced with MySQL.

    Thanks in advance!
     
    glenv, Oct 12, 2008 IP
  2. WebSolutions86

    WebSolutions86 Peon

    Messages:
    434
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It should not take much time to publish a post, try this, de-activate all your plugins and then try publishing those posts. Then you can activate plugins again.
     
    WebSolutions86, Oct 14, 2008 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you have PHPMyAdmin:

    1. Select "Wordpress" database.
    2. Select "wp_posts" in the left-hand menu.
    3. Click Search in the menu bar.
    4. Select "post_status" and press GO.
    5. Click Check All and deselect any that are not 'draft' or 'pending'.
    6. Click the Change icon (little pencil).
    7. Change the "post_status" field from draft or pending to publish, and press GO

    With that many posts, it could take a while for them all to show up. It maybe quicker to use a SQL command:

    1. Select "Wordpress" database.
    2. Select SQL from menu bar.
    3. Enter update wp_posts set post_status = 'publish' where post_status = 'draft' or post_status = 'pending' , and press GO.
    If you just want the posts that were pending, use update wp_posts set post_status = 'publish' where post_status = 'pending'
     
    Cash Nebula, Oct 14, 2008 IP
  4. glenv

    glenv Peon

    Messages:
    930
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    glenv, Oct 14, 2008 IP
  5. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You're welcome :)

    I've answered your other thread too.
     
    Cash Nebula, Oct 14, 2008 IP
  6. glenv

    glenv Peon

    Messages:
    930
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thanks again!
     
    glenv, Oct 14, 2008 IP