How to – Change the Author of All Posts At Once in WordPress

I updated the design of Big.Info, I had a minor surgery and had to rest for a while and now I am back posting!

Have you ever needed to change the post authors in your wordpress blog or site? Doing it manually for a couple of posts is easy, that is okay. But what If you need to do this for 200 posts?

First of all you need to have access to your database through phpMyAdmin because we will be running a script on our wp database.

If you are using a shared hosting for WordPress, then you should have a cPanel to conduct your site management tasks. In your cPanel you should have a link to phpMyAdmin, follow that link to start phpMyAdmin application.

A sample cPanel menu with phpMyAdmin link

Click the “<prefix>_posts” on the left side of the phpMyAdmin screen then click SQL on the top menu to open up the query window. “<Prefix>” is the database prefix that you set while installing WordPress.

Note: These steps on the phpMyAdmin screen may change depending on the phpMyAdmin version. The idea is accessing the “posts” table and running an sql script on that table.

Once you open the query window run the below script to change the author Id for all the posts:

UPDATE <prefix>_posts SET <prefix>_posts.post_author = “2” WHERE <prefix>_posts.post_author = “1”


Here the values “2” and “1” represent the author ids for the new and the old authors respectively. Once you run this query, author for all the posts will change to the new one.

Hope this helps someone.

Good luck,


Leave a Reply

Your email address will not be published. Required fields are marked *