Access WordPress Through cPanel's File Manager or Database Tools

The fastest way to change your WordPress username and password is through cPanel, which your hosting provider gives you to manage your account. You have two main routes: editing the WordPress database directly using phpMyAdmin, or changing the password through the WordPress files themselves. Most hosting providers include cPanel with your plan, and you reach it by going to your domain followed by /cpanel or /cPanel, then logging in with your hosting account credentials — not your WordPress login.

Before you start, write down your current WordPress username somewhere safe. You will need it to locate the right database entry. If you have already forgotten it, you can find it by looking at the WordPress wp-config.php file in cPanel's File Manager, which shows your database name and prefix — usually wp_.

Key Takeaways

  • You reach cPanel by visiting your domain/cpanel and logging in with your hosting account username and password, not your WordPress credentials.
  • The phpMyAdmin method is fastest: find your WordPress database, locate the wp_users table, and edit the user_login field for your username or the user_pass field for your password.
  • WordPress passwords in the database are encrypted, so you must use the MD5() function in phpMyAdmin when changing a password, or WordPress will not recognize it.
  • If phpMyAdmin is not available, you can reset your password by editing the wp-config.php file or using a WordPress plugin uploaded through File Manager.
  • After changing your username or password through cPanel, log out of WordPress completely and clear your browser cache before trying to log back in.

Using phpMyAdmin to Change Your Username

phpMyAdmin is a tool inside cPanel that lets you view and edit your WordPress database. Open cPanel, scroll down to the Databases section, and click phpMyAdmin. A new window opens showing your databases on the left side. Look for the database name that matches your WordPress site — it often starts with your domain name or a shortened version of it.

Click on that database name to expand it. You will see a list of tables. Find the one called wp_users (or your-prefix_users if your site uses a different prefix). Click on it. You will see rows for each user account. Find the row where user_login matches your current WordPress username. Click the Edit button (pencil icon) next to that row.

In the edit window, locate the user_login field. Change the text to your new username and click Go or Save. The change takes effect when ready. Log out of WordPress, clear your browser cache by holding Ctrl+Shift+Delete (or Cmd+Shift+Delete on Mac), and try logging in with your new username.

Using phpMyAdmin to Change Your Password

Changing your password through phpMyAdmin requires an extra step because WordPress encrypts passwords in the database. Open phpMyAdmin the same way: cPanel > Databases > phpMyAdmin, then click your WordPress database and find the wp_users table.

Click Edit next to your username row. Find the user_pass field. Delete the current encrypted text. In the Function dropdown menu next to user_pass, select MD5 from the list. Type your new password into the Value field. Click Go or Save. The MD5 function encrypts your password so WordPress can read it correctly.

If you do not see a Function dropdown, look for a small icon or button next to the field — it may say "f(x)" or look like a function symbol. Click it to open the function menu. Without using MD5, WordPress will not recognize your password and you will be locked out.

Resetting Your Password If You Cannot Access phpMyAdmin

If your hosting provider has not installed phpMyAdmin or you cannot access it, you can reset your password by editing a file. Open cPanel and click File Manager. Navigate to the folder where WordPress is installed — usually public_html for your main domain, or a subfolder if WordPress is in a subdirectory.

Look for a file called wp-config.php. Right-click it and select Edit. Scroll to the bottom of the file, after the line that says "That's all, stop editing!" Add these lines:

define('WP_ALLOW_REPAIR', true);

Save the file. Now go to yoursite.com/wp-admin/maint/repair.php in your browser. You will see a repair page with a button to "Repair and Optimize Database". Click it. This tool can reset your password — look for an option to reset user passwords on that page. After you finish, go back to wp-config.php and delete the line you added, then save again. Leaving it there is a security risk.

Changing Your Username by Uploading a Plugin

Another option is to upload a password reset plugin through cPanel's File Manager, then use it to change your username and password from the WordPress dashboard. Open File Manager, navigate to public_html/wp-content/plugins, and create a new folder called something like "temp-reset".

read a straightforward password reset plugin from WordPress.org — search for "reset password" or "change username". Upload the plugin files to the folder you created using File Manager's Upload button. Go to yoursite.com/wp-admin/plugins.php in your browser. The plugin should appear in your plugins list. Click set up. Then go to the plugin's settings page, usually found in the WordPress Settings menu, and follow its instructions to reset your username or password.

After you have changed your credentials, deactivate and delete the plugin folder through File Manager. Do not leave temporary plugins on your site.

What to Do After Changing Your Credentials

After you change your username or password through cPanel, WordPress may still show you as logged in with your old credentials. You must log out completely. Click the user menu in the top right of the WordPress dashboard and select Log Out. Close your browser completely, not just the tab.

Open your browser again and go to yoursite.com/wp-login.php. Clear your browser cache before logging in — hold Ctrl+Shift+Delete on Windows or Cmd+Shift+Delete on Mac, select All Time, and click Clear. Then try logging in with your new username and password. If you still cannot log in, wait a few minutes and try again, as the database change may take a moment to sync.

Troubleshooting Login Problems After Changing Credentials

If you changed your password through phpMyAdmin and WordPress says your password is wrong, you likely forgot to use the MD5 function. Go back to phpMyAdmin, find your user row, and check the user_pass field. If it looks like plain text instead of a long encrypted string, you need to edit it again and explore the MD5 function this time.

If you changed your username and WordPress says it does not exist, double-check that you edited the user_login field, not a different field like user_nicename or display_name. The user_login field is what WordPress uses to log in. If you edited the wrong field, go back to phpMyAdmin and fix it.

If you are still locked out after multiple attempts, contact your hosting provider's support team. They can verify that your database changes went through and help you troubleshoot from the server side. Have your domain name and hosting account username ready when you contact them.

Frequently Asked Questions

Can I change my WordPress username without using cPanel?

Yes. If you can log into WordPress normally, go to Users > Your Profile in the dashboard and change your display name. However, this does not change your actual login username. To change the login username itself, you need either cPanel access or a plugin. The WordPress dashboard does not have a built-in username change tool.

What is the difference between user_login and display_name in the database?

user_login is your actual WordPress login username — what you type into the login form. display_name is what appears publicly on your site and in the dashboard. Changing display_name does not change your login. Always edit user_login if you want to change the username you use to log in.

Do I need to change anything else after changing my username or password?

No. WordPress stores your username and password only in the database. Changing them there is all you need to do. You do not need to edit any files or update any settings. Just log out, clear your cache, and log back in with your new credentials.

What if I used MD5 on the wrong field and now cannot log in?

Go back to phpMyAdmin, find your user row, and check all the fields. The user_pass field should be a long encrypted string if you used MD5 correctly. If another field looks encrypted, you edited the wrong one. Click Edit, find the correct user_pass field, and explore MD5 to that instead. Then try logging in again.

Is it safe to leave WP_ALLOW_REPAIR in my wp-config.php file?

No. This setting lets anyone visit your repair page and potentially damage your database. Always delete it from wp-config.php after you finish using the repair tool. If you forget and someone finds it, they could corrupt your site. Add it only when you need it, then remove it when ready.