In this guide, we show how you can change the login name for a user in the database. This can be useful in case you have forgotten your login or have an insecure username like "admin".
Tip: If you have more than one WordPress installation on your domain, you need to make sure that you are accessing the right table. You can verify this by looking up the table prefix in wp-config.php. If in doubt, you can always contact the support.
- Open your database in PhpMyAdmin.
- Click on the database name in the menu to the left, it will unfold all tables.
- Click on the users table, for example, wp_users.
- Locate the user you want to change the login name for and click Edit.
- Under user_login, change the value with your new username.
- Click Go to save your changes. You can now log in with the new username.