I encountered a situation earlier this afternoon and after a bit of searching found the answer courtesy of Pizdin Dim here
I recently restored our Sox N Dots site from backup and because I’d only created an admin account, all of our posts had been migrated onto that account. Not ideal and of course, WordPress doesn’t provide the facility to bulk transfer posts to another user. I knew at this point that I’d have to find a MySQL solution though my knowledge of SQL is limited to such simple commands as SHOW, CREATE and SELECT.
That’s when I happened upon PizDin Dim’s forum post to use the following:
update wp_posts set post_author=NEWID where post_author=OLDID
Place your new author’s ID (Not the name, the ID number) as the NEWID and obviously the other is old author’s ID number. Did the job, and it did it properly too.
Don’t forget to backup your database first.
