• Hi,

    I need to change the ID of a user in the database. Is there any plugin or sql code to automatically do that? If not, any ideas which tables to look for editing?

    Do not ask me to do anything other that what im requesting. I NEED to change the ID of some users to specific ones

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Do not ask me to do anything other that what im requesting.

    Somehow, I find that insulting, though my answers may meander from time to time.

    If you know how to do it, hitting the database directly is the easiest way to do it. The user’s login name (what I think you mean by the ID) is in the wp_users table. Additional info is in wp_usermeta, thought the two are linked by a database key, so changing the contents of the user_login field shouldn’t break any of those links. That said, if there are any plugins that are keying on users that use the user_login field instead of the row ID for that field, things may break, so be sure to test this out for one or two users first.

    Thread Starter SGURYGF

    (@sgurygf)

    I am sorry if that sounded insulting, I didn’t mean to be rude. Its just very common to post a question and people to start replying with irrelevant posts.

    Yes i am comfortable working directly with the database. I would do it manually table by table, I just thought maybe someone has done it before and wanted to share the code.

    However I have limited time, I will do it myself. I have many plugins installed, hopefully I will be able to fix everything.

    Thanks for your reply

    • This reply was modified 7 years, 10 months ago by SGURYGF.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    backup first ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change ID of a user’ is closed to new replies.