How to Change Admin Username and Password in WordPress

by FaizAlias | Last updated Aug 3, 2026 | Published on Aug 3, 2026 | WordPress & Blogging

Changing your WordPress administrator username and password is one of the most important security practices for protecting your website. Whether you have forgotten your login credentials, want to replace the default "admin" username, or simply wish to improve your site's security, knowing how to update these credentials correctly is essential.

Many WordPress websites become vulnerable because administrators continue using weak passwords or predictable usernames. Cybercriminals frequently target WordPress login pages using automated tools that attempt to guess usernames and passwords. By updating both your administrator username and password, you can significantly reduce the risk of unauthorized access.

In this comprehensive guide, you will learn how to change admin username and password in WordPress using multiple proven methods. Each method is suitable for different situations, whether you can still access your WordPress dashboard or have been locked out of your website completely.

Table of Contents

How to Change Admin Username and Password in WordPress

How to Change Admin Username and Password in WordPress
How to Change Admin Username and Password in WordPress

Why You Should Change Your WordPress Admin Username and Password

Before learning how to change admin username and password in WordPress, it is helpful to understand why these changes are so important.

The administrator account has complete control over your website. Anyone who gains access to this account can:

  • Install or remove plugins
  • Change website settings
  • Edit posts and pages
  • Delete important content
  • Upload malicious files
  • Create additional administrator accounts
  • Lock legitimate users out of the website

Because administrator accounts are extremely powerful, they are often the primary target of hackers.

Changing your administrator username and password regularly helps strengthen your website security and minimizes the chances of successful brute-force attacks.

When Should You Change Your Admin Username and Password?

There are several situations where changing your administrator credentials becomes necessary.

You Are Still Using "admin" as Your Username

Many older WordPress installations used "admin" as the default administrator username.

Since attackers commonly try this username first, replacing it with something unique immediately improves security.

Your Password Is Weak

Passwords such as:

  • password123
  • admin123
  • qwerty
  • 12345678
  • your website name

can often be cracked within minutes using automated tools.

A strong password should include:

  • Uppercase letters
  • Lowercase letters
  • Numbers
  • Symbols
  • At least 16 characters

Your Website Has Been Hacked

If your website has experienced unauthorized access, changing the administrator username and password should be among your first recovery steps.

Multiple People Know Your Login Credentials

If developers, freelancers, or former employees previously had access to your administrator account, updating your credentials helps maintain security.

Method 1: Change Your Admin Password from the WordPress Dashboard

This is the easiest method if you can still log in.

Step 1: Log Into WordPress

Visit:

https://yourwebsite.com/wp-admin

Log in using your administrator account.

Step 2: Open Your Profile

Navigate to:

Users → Profile

or

Users → All Users

Then click your administrator account.

Step 3: Generate a New Password

Scroll down until you find:

Account Management

Click:

Generate Password

WordPress automatically creates a strong password.

You may also replace it with your own custom password.

Step 4: Save Changes

Click:

Update Profile

Your administrator password has now been updated.

Method 2: Change Your Password from the Login Screen

If you have forgotten your password but still have access to your email address, WordPress provides an easy password recovery feature.

Step 1: Visit the Login Page

Open:

https://yourwebsite.com/wp-login.php

Click:

Lost your password?

Step 2: Enter Your Username or Email

Type either:

  • Username
  • Email address

Click:

Get New Password

Step 3: Check Your Email

WordPress sends a secure password reset link.

Open the email.

Click the reset link.

Step 4: Create a New Password

Enter your new password.

Save the changes.

You can now log in using your updated password.

Method 3: Change Your Password Using phpMyAdmin

If you cannot access either your dashboard or email, phpMyAdmin provides another solution.

Step 1: Log Into Your Hosting Control Panel

Open your hosting account.

Launch:

phpMyAdmin

Step 2: Select Your WordPress Database

Choose the database connected to your WordPress website.

If you are unsure, check your:

wp-config.php

Locate:

DB_NAME

Step 3: Open the Users Table

Usually:

wp_users

Some websites use a custom table prefix such as:

abc_users

Step 4: Edit the Administrator Account

Find your administrator account.

Click:

Edit

Locate:

user_pass

Replace the current encrypted value.

Choose:

MD5

Type your new password.

Example:

MySecurePassword2026!

Click:

Go

WordPress automatically re-encrypts the password during the next login.

Method 4: Change the Admin Username by Creating a New Administrator

Unlike passwords, WordPress does not allow usernames to be changed directly from the dashboard.

Instead, you create a new administrator account.

Step 1: Go to Users

Navigate to:

Users → Add New

Step 2: Create a New Administrator

Fill in:

  • Username
  • Email
  • Password

Select:

Administrator

Click:

Add New User

Step 3: Transfer Content

If your old administrator owns posts or pages:

Delete the old account.

WordPress asks whether you want to:

Attribute all content to another user.

Select your new administrator account.

No content will be lost.

Method 5: Change the Username Using phpMyAdmin

Advanced users can modify usernames directly.

Step 1: Open phpMyAdmin

Select your WordPress database.

Step 2: Open

wp_users

Locate:

user_login

Click:

Edit

Replace:

admin

with

yournewusername

Click:

Go

The username is now updated.

Method 6: Change Credentials Using WP-CLI

If your hosting supports WP-CLI, changing administrator credentials becomes very fast.

Update password:

wp user update admin --user_pass="NewStrongPassword123!"

Update username:

WordPress does not officially allow username changes through a simple WP-CLI command.

Instead, create a new administrator account:

wp user create newadmin admin@example.com --role=administrator

Then remove the old account.

Method 7: Change Credentials Using FTP

If your website has serious login problems, FTP can help reset administrator credentials.

This method usually involves editing files temporarily or using a password reset script.

Because it requires technical knowledge, beginners should only use this method if other methods fail.

Always create a backup before making any file changes.

How to Create a Strong Administrator Password

A secure password should be difficult for both humans and automated tools to guess.

Good example:

L8!vQ2@zWp#91RtM

Poor examples:

password
admin123
football
welcome
123456

A strong password should:

  • Contain at least 16 characters.
  • Include uppercase and lowercase letters.
  • Include numbers.
  • Include symbols.
  • Avoid dictionary words.
  • Be unique to your WordPress website.
  • Never be reused on other online accounts.

Password managers can generate and securely store complex passwords, making it easier to maintain strong security without having to memorize every credential.

Best Practices for Choosing a Secure Admin Username

Your administrator username is just as important as your password.

Avoid usernames like:

  • admin
  • administrator
  • root
  • webmaster
  • test
  • support

Instead, create something unique that is difficult to guess.

For example:

  • jharrison82
  • wpmanager458
  • studioowner91

Avoid using your full name, company name, or website domain if they are publicly visible, as attackers often use publicly available information when attempting to guess login credentials.

What to Do After Changing Your Credentials

Changing your administrator username and password is only part of securing your website. After updating your credentials, take additional steps to ensure your website remains protected.

First, log out of all active sessions and log in again using your new credentials. This confirms that the changes have been applied successfully.

Next, update any password managers or browser-saved passwords with the new login details to avoid confusion during future logins.

If your website has multiple administrators, inform only the authorized users about the updated login procedures. Never send passwords through unsecured email or messaging applications.

It is also a good idea to review your administrator accounts. Remove any inactive or unnecessary administrator users that no longer require access to the website.

Finally, create a fresh backup of your WordPress website after confirming everything is working properly.

Additional Security Tips for WordPress Administrators

Changing your administrator username and password should be part of a broader security strategy. Consider implementing the following measures to further protect your website:

Security PracticeBenefit
Enable two-factor authentication (2FA)Adds an extra verification step during login.
Limit login attemptsPrevents repeated brute-force login attempts.
Use a security pluginDetects malware, suspicious activity, and vulnerabilities.
Keep WordPress updatedProtects against known security flaws.
Update themes and plugins regularlyReduces the risk of exploits caused by outdated software.
Remove unused plugins and themesEliminates unnecessary attack surfaces.
Use secure hostingProvides additional server-level protection.
Schedule automatic backupsAllows quick recovery after security incidents.

Combining these practices with strong administrator credentials provides a much higher level of protection than relying on passwords alone.

Common Problems When Changing Admin Username and Password

ProblemPossible CauseSolution
Unable to log in after changing passwordPassword entered incorrectly or browser cache issueReset the password again and clear your browser cache.
Password reset email not receivedEmail delivery problem or incorrect email addressVerify the administrator email in the database or use phpMyAdmin to reset the password.
Username cannot be changed in the dashboardWordPress does not support direct username editingCreate a new administrator account or update the username through phpMyAdmin.
Locked out of the dashboardIncorrect credentials or security plugin restrictionsUse phpMyAdmin or WP-CLI to reset access.
Changes do not appear to take effectBrowser cache or server cachingClear browser, plugin, and server caches before trying again.
New administrator account cannot perform admin tasksIncorrect user role assignedVerify that the account has the Administrator role.

Advantages and Disadvantages of Changing Admin Username and Password

AdvantagesDisadvantages
Improves website security by making login credentials harder to guess.Changing usernames requires creating a new administrator account in most cases.
Reduces the risk of brute-force attacks.Users may forget newly created credentials if they are not stored securely.
Protects administrator privileges from unauthorized access.Updating saved passwords across browsers and devices may take additional time.
Helps recover access after forgotten passwords or security incidents.Database editing methods require technical knowledge and should be performed carefully.
Encourages better security practices across the website.Incorrect changes through phpMyAdmin may temporarily prevent login if mistakes are made.

Comparison of Methods to Change Admin Username and Password

MethodUsernamePasswordDifficultyBest For
WordPress DashboardNoYesEasyRoutine password updates.
Password Reset via EmailNoYesEasyForgotten passwords with email access.
phpMyAdminYesYesMediumLocked-out users or advanced troubleshooting.
Create New AdministratorYesYesEasySafely replacing the default admin username.
WP-CLIIndirectlyYesMediumDevelopers and server administrators.
FTPLimitedLimitedAdvancedEmergency recovery situations.

Conclusion

Understanding how to change admin username and password in WordPress is an essential skill for every website owner. Whether you are performing routine security maintenance, recovering from a forgotten password, or replacing the default administrator username, WordPress offers several reliable methods to complete the task.

For most users, updating the password through the WordPress dashboard or using the built-in password recovery feature is the quickest and safest option. If you no longer have dashboard access, tools such as phpMyAdmin or WP-CLI provide effective alternatives. Since WordPress does not allow usernames to be edited directly from the dashboard, creating a new administrator account is generally the recommended approach for changing the administrator username.

By combining strong credentials with additional security measures such as two-factor authentication, regular software updates, limited login attempts, and routine backups, you can greatly reduce the risk of unauthorized access and keep your WordPress website secure for the long term.

Frequently Asked Questions (FAQs)

Can I change my WordPress admin username directly from the dashboard?

No. WordPress does not allow you to edit the administrator username directly from the dashboard after the account has been created. The recommended method is to create a new administrator account with the desired username, log in using the new account, transfer any content if necessary, and then delete the old administrator account.

How do I change my WordPress admin password?

You can change your administrator password by logging into your WordPress dashboard and navigating to Users → Profile. Scroll to the Account Management section, click Generate Password, enter a new secure password if desired, and click Update Profile to save your changes.

What should I do if I forgot my WordPress admin password?

If you have access to the administrator email address, visit the WordPress login page and click Lost your password?. Enter your username or email address, then follow the password reset link sent to your email.

Can I change my admin username using phpMyAdmin?

Yes. If you have access to your hosting control panel, you can open phpMyAdmin, locate the wp_users table, edit the user_login field, and replace the existing username. Always create a database backup before making changes.

Is changing the admin username better than only changing the password?

Changing both provides better security. While a strong password protects your account, using a unique administrator username makes it more difficult for attackers to guess your login credentials during brute-force attacks.

How often should I change my WordPress administrator password?

There is no fixed rule, but changing your administrator password every three to six months is considered good security practice. You should also change it immediately if you suspect unauthorized access or if your credentials have been shared with others.

What makes a strong WordPress administrator password?

A strong password should:

- Be at least 16 characters long.
- Include uppercase and lowercase letters.
- Contain numbers and special characters.
- Avoid dictionary words or personal information.
- Be unique and not reused on other websites.

Using a password manager can help generate and securely store complex passwords.

Will changing my admin username affect my posts and pages?

No. If you create a new administrator account and transfer ownership of your posts during the deletion of the old account, all your content will remain intact.

Can I reset my WordPress password without email access?

Yes. If you cannot access the administrator email account, you can reset the password using phpMyAdmin or WP-CLI, provided you have access to your hosting control panel or server.

Why can't I log in after changing my password?

This can happen if the password was entered incorrectly, the browser is using cached credentials, or the password was not saved properly. Try clearing your browser cache, resetting the password again, or verifying the changes in phpMyAdmin if necessary.

Is it safe to use the default "admin" username?

No. The default "admin" username is widely known and is commonly targeted in brute-force attacks. Replacing it with a unique administrator username significantly improves your website's security.

Should I enable two-factor authentication after changing my administrator credentials?

Yes. Two-factor authentication (2FA) adds an extra layer of protection by requiring a second verification step during login. Even if someone discovers your username and password, they will still need the second authentication factor to access your WordPress administrator account.

References

  1. How to change WordPress username: 3 effective methods - hostinger.com/tutorials
  2. How to Manually Reset Your WordPress Admin Password - greengeeks.com/tutorials

Category

E

How to

E

Pets & Animals

E

Divi Theme Tutorial

E

Home & Garden

E

SEO & Performance

E

Compare & Review

E

Info & Fact

E

WordPress & Blogging

E

View All Categories

Arbor Design

895 South Randall Road, Chicago

Arbor & Landscaping

4999 Old Orchard Center, Chicago

Let's start work together

Pin It on Pinterest