A user wants to change his username and leave his email address the same. How?

How does a user change his username and maintain the same email address?

  • Ash
    • WordPress Hacker

    Hello @montypelerin

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    You can't change the username, wordpress won't allow it. The only way to change the username is from database. If you go to the database/phpmyadmin you should see a table wp_users and there you can edit the row and change the username.

    Make sure, when you change the username, the new username is unique.

    Please let me know if you find this is helpful, or if you have any further questions.

    Cheers
    Ash

  • Wharrf
    • Site Builder, Child of Zeus

    Hi montypelerin,

    If you followed Ashok's suggestion, you might not be able to reassign the posts for the user.

    May I suggest that instead, you do the following:
    1. Create a new user with the desired username and a bogus email.
    2. Delete the existing user
    3. Assign ALL posts to the new user
    4. Change the bogus email to the correct user.

    This will ensure that all the posts are changed to the new user.

  • Ash
    • WordPress Hacker

    @Buooy

    If you followed Ashok's suggestion, you might not be able to reassign the posts for the user.

    I don't think this will be a problem. I didn't test it though, but when you will change the username from database, it should automatically replace all references of old username. So, you need not to reassign.

  • Wharrf
    • Site Builder, Child of Zeus

    Ahhhhh, what was I thinking? That's true because they are using user Id rather than username.

    But following this method means you won't need access to the database. Assuming that yours is a fairly basic setup without custom tables

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.