Created
March 12, 2015 21:01
-
-
Save bhubbard/c2cad006d453de012d1c to your computer and use it in GitHub Desktop.
hange author attribution on all posts at once Do you need to change author attribution on many posts? If yes, you don’t have to do it manually. Here’s a handy query to do the job for you. The first thing to do is getting the IDs of WordPress users. Once logged in phpmyadmin, insert the following SQL command:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT ID, display_name FROM wp_users; | |
| UPDATE wp_posts SET post_author=NEW_AUTHOR_ID WHERE post_author=OLD_AUTHOR_ID; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment