• zach

    (@zach)


    I have two authors/users: 1) admin and 2) me. Somewhere back I logged in as admin to do some backups or something and forgot to log out. I haven’t had the author name display on the page so I didn’t catch it until just now.
    Does anyone know what the best way to change the author of a bunch of posts at one time? In my case I want to change all of the posts authored by site admin (user 1) to me (user 2).
    I found a couple older posts here but there was no real conclusion. I started to change each one by hand through phpMyAdmin but there are over a hundred and it will take so long.
    Thanks
    -zach

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous

    “and Johnny did ascend the mountain, and upon that mountain Johnny did meet the Oracle. It was the Google. Johnny, whilst averting his eyes, did ask the Oracle his question, whereupon the Great and All-seeing Google did reply, thusly:”
    https://tinyurl.com/5a7mq

    carthik

    (@carthik)

    Lol!
    Alrighty, ass-hats and Johnies aside, you will need to execute a query on the database, using phpmyadmin, if you have it on your server.
    Try modifying the query displayed by phpmyadmin when you change the author for one post, to do the work for all the posts. That works best. If you can post the query that did it for one post, I can modify it to do all of them for you. The query is usually shown at phpmyadmin each time you do something, like you already have.
    Hope that helps, if slightly.

    carthik

    (@carthik)

    Please make sure your table-prefix is wp. If it’s not wp, say if it is blog, then that will be
    UPDATE blog_posts ....
    Also, the numbers 2 and 1 are the ids for the authors.
    The only reason I asked for the query was so that I could get these straight ??

    Kafkaesqui

    (@kafkaesqui)

    Yeah, go ahead and make me look rash and dangerous… ??

    Thread Starter zach

    (@zach)

    UPDATE wp_posts SET post_author = '2' WHERE post_author = '1';

    That did it! Thank you so much fellas. That’s all Johnny was looking for : )

    Anonymous

    Too bad you have no sense of humour, zach. Sorry that you are so uptight…perhaps you need more fibre in your diet.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘change author for over 100 posts?’ is closed to new replies.