Reputation: 1
I have 200 post in my site without any author.
How can i add this post to admin user in wordpress wp-admin or by sql
Upvotes: 0
Views: 350
Reputation: 15616
Use the following SQL on your database:
UPDATE wp_posts SET post_author = 1 WHERE post_author = NULL
Where wp_posts
is the name of your posts table, and 1
is the ID of your admin user. Also if the post_author
is something other than NULL
update the WHERE
clause appropriately.
Upvotes: 1