Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk11 min

How to Reset a WordPress Admin Password with WP-CLI

Use WP-CLI to reset a WordPress administrator password without editing database tables. This guide covers account verification, interactive and generated passwords, multisite URLs, remote paths, notifications, output risks, and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

From the WordPress installation directory, identify the correct administrator and run wp user update ADMIN_LOGIN --prompt=user_pass to choose a new password without putting it in shell history. If you need WP-CLI to generate one, use wp user reset-password ADMIN_LOGIN --show-password, then handle the displayed password as sensitive plaintext.

What you need before resetting a password

WP-CLI changes the WordPress account through WordPress itself rather than requiring direct edits to database tables. The WordPress Advanced Administration Handbook describes it as a secure, command-line method for password resets without directly modifying database tables. You still need an operating-system account that can run WP-CLI, access to the WordPress files (or a configured remote connection), and enough WordPress permissions for the command to update users.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • WP-CLI available: Check the installed command and its version before a production change. Command documentation is regenerated at every WP-CLI release, so flags can differ between versions.
  • Correct installation: Run commands from the directory containing wp-config.php, or provide the installation explicitly with --path=/path/to/wordpress.
  • Correct site: In a multisite network, include --url=https://example.com/site/ so the user lookup and password change apply to the intended site.
  • Account identifier: Have the administrator’s login, email address, or numeric user ID ready. WP-CLI accepts each of these forms.
  • Secure handling plan: Decide where a chosen password will be delivered, or where a generated password will be stored, before you print or transmit it.

The WordPress password-reset guidance was first published on November 6, 2018 and last updated March 27, 2026. Treat those dates as documentation context, not as a guarantee that every installed WP-CLI version has the same flags; verify the local version and command help before production use.

1. Select the WordPress installation

Open a shell on the server and change to the WordPress directory. A typical sequence is:

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
cd /path/to/wordpress
wp user list

If you do not want to change directories, put the path on each command:

wp --path=/path/to/wordpress user list

--path is a global parameter, so it can be used with both user list and password-changing commands. A path that points to the wrong WordPress copy can produce a perfectly valid-looking user list from the wrong site, so confirm the directory before changing credentials.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a remote server or container, WP-CLI also provides the global --ssh parameter. Use it with the same command you would run locally, for example:

wp [email protected] --path=/var/www/html user list

The exact SSH destination and remote path depend on your environment. The important distinction is that --ssh executes against the remote target while --path identifies the WordPress files on that target.

2. List users and verify the administrator

Never reset an account solely because its display name looks familiar. First list users and match the administrator by login, email, or ID:

wp user list

The output lets you distinguish accounts that have similar names. Record the exact login or ID for the account you intend to change. WP-CLI accepts one or more user logins or IDs for wp user reset-password, and accepts a login, email, or ID for wp user update.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you need to inspect only administrator accounts, ask user list for administrator IDs:

wp user list --format=ids --role=administrator

This returns a role-derived list of IDs that can be passed to a reset command. Review the IDs before acting; a role filter identifies every matching administrator, not necessarily the person who requested the reset.

On multisite, repeat the lookup with the target site’s URL:

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
wp --url=https://example.com/site/ user list

Use the same --url value on the eventual update or reset. Selecting the user on one site and changing a password against another is an avoidable scope error.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Choose a new password without exposing it in shell history

When an operator must choose the password, use wp user update with the interactive password prompt:

wp user update ADMIN_LOGIN --prompt=user_pass

Replace ADMIN_LOGIN with the verified login, email, or ID. WP-CLI prompts for the value instead of placing the password in the command line. This is the safer form recommended by the Advanced Administration Handbook because a password written directly in a command can be retained in shell history or exposed to process-inspection tools.

Do not substitute a literal password in a shared terminal transcript. Although wp user update accepts --user_pass=<password>, putting the value in the command makes the secret part of the command text. Use the prompt form for an interactive change:

wp user update ADMIN_LOGIN --prompt=user_pass

WP-CLI reports the result after the update. Keep that status output, but do not copy the entered password into tickets, chat, screenshots, shell transcripts, or other shared records.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To suppress the change-notification email during an update, add --skip-email only when that suppression is intentional:

wp user update ADMIN_LOGIN --prompt=user_pass --skip-email

Before using the flag, decide how the account owner will learn that the password changed. Suppressing the message without an alternative notification can leave the owner unaware of the reset.

4. Generate a random password with wp user reset-password

For a generated credential, use:

wp user reset-password ADMIN_LOGIN --show-password

wp user reset-password is designed to reset the password for one or more users. It generates the new password and, with --show-password, prints it so an operator can deliver it through an approved secure channel.

The display option is useful operationally but creates a plaintext exposure. The handbook warns that --show-password can expose the new password in terminal output, logs, screenshots, or shared support sessions. Treat the terminal as sensitive while the command runs, prevent unnecessary screen sharing, and clear or protect any recorded output according to your organization’s policy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

If a password-only value is required for another controlled process, the command reference also supports --porcelain:

wp user reset-password ADMIN_LOGIN --porcelain

--porcelain outputs only the password. That minimal output is convenient for automation, but it is still plaintext and should be handled as a secret. Do not pipe it to an unprotected log, paste it into a shell command, or leave it in a temporary file.

When neither --show-password nor --porcelain is used, the generated password is not printed for you to read. Plan the handoff before running a generated-password reset so you do not have to repeat the operation merely to obtain a deliverable value.

By default, the generated-password flow emails the user that the password changed. The notification does not contain the new password. Use --skip-email only when omitting that notification is deliberate:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp user reset-password ADMIN_LOGIN --show-password --skip-email

That combination gives the operator the generated value while suppressing the normal change notice. Record the reason for suppressing the email and use an approved secure channel to tell the account owner what action to take.

5. Reset an account in a multisite network

Multisite requires an explicit site selector when the command is not already running in the intended site context. Add the global --url parameter before the user command:

wp --url=https://example.com/site/ user reset-password ADMIN_LOGIN --show-password

The URL identifies the site whose users are being addressed. Use the same selector while listing users and while resetting the password. If the network has several sites with similarly named administrators, verify the URL, login, email, and ID together before confirming the change.

The chosen-password variant follows the same pattern:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp --url=https://example.com/site/ user update ADMIN_LOGIN --prompt=user_pass

Combine site selection with an explicit path when the WordPress files are not the current directory:

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
wp --path=/var/www/html --url=https://example.com/site/ user update ADMIN_LOGIN --prompt=user_pass

Global parameters can be combined with the generated-password command as well. The key is to establish both scopes before changing credentials: the filesystem installation through --path (or the remote target through --ssh) and the network site through --url.

6. Reset every administrator only when that is actually required

Most incidents involve one account. If an approved recovery procedure requires rotating all administrator passwords, first obtain the administrator IDs and inspect the list:

wp user list --format=ids --role=administrator

The command reference shows those IDs being passed to wp user reset-password. A shell substitution can perform that operation, but review the generated ID list before executing a multi-account change. A safer two-stage workflow is to save the displayed IDs in a protected, short-lived working note, verify the scope with another operator, and then run the reset for the confirmed IDs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a single site in a multisite network, include --url in both stages:

wp --url=https://example.com/site/ user list --format=ids --role=administrator
wp --url=https://example.com/site/ user reset-password ID_1 ID_2 --show-password

Replace the example IDs with the values you verified. Because each generated password is sensitive, establish how each recipient will receive their own value before starting a multi-user rotation. Do not send a group message containing all administrators’ credentials.

7. Select the command that matches the situation

Need Command Password handling Notification
Choose a password interactively wp user update ADMIN_LOGIN --prompt=user_pass The value is entered at a prompt and is not placed in the command text. A change email is sent unless --skip-email is added.
Generate a password and display it wp user reset-password ADMIN_LOGIN --show-password Generated plaintext appears in terminal output; protect it from logs and screenshots. The user is emailed that the password changed; the email does not contain the password.
Generate a password for controlled automation wp user reset-password ADMIN_LOGIN --porcelain Only the password is printed, but the output remains sensitive plaintext. The normal change email is sent unless --skip-email is added.
Suppress the change email intentionally Add --skip-email to either command. Does not change how the password itself is exposed. No change notification is sent; provide another approved notification path.
Target a non-current installation Add --path=/path/to/wordpress. Applies the command to the files at that path. Uses the selected command’s normal notification behavior.
Run against a remote server or container Add the global --ssh parameter. Protect the remote terminal and any returned password output. Uses the selected command’s normal notification behavior.
Select a site in multisite Add --url=https://example.com/site/. Applies the reset to the selected site’s user context. Uses the selected command’s normal notification behavior.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

8. Verify the result without exposing the credential

After a successful command, verify the account and sign-in path without printing the password again. Confirm that:

  • The login, email, or ID in the command matched the account you intended to recover.
  • The command ran against the expected installation path, remote target, and, where applicable, multisite URL.
  • The account owner received the change notification or the approved alternative handoff.
  • The owner can sign in through the normal WordPress login page.
  • Any temporary or emergency credential is rotated again if your policy requires a second change after access is restored.

A generated password is not included in the default notification email. If you used --show-password or --porcelain, transmit the value only through a channel approved for credentials, then remove unnecessary copies from terminal history, logs, screenshots, notes, and temporary files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

9. Troubleshoot common failures

WP-CLI reports that it cannot find WordPress

Change to the directory that contains the installation or add --path:

wp --path=/path/to/wordpress user list

If the command is remote, ensure the path is the path on the remote host and include the appropriate --ssh target. Re-run user list before attempting a password change; a successful listing confirms that WP-CLI is operating against a WordPress installation.

The wrong user appears in the result

Stop and repeat the identification step. Compare the login, email, and ID from wp user list. In multisite, add the exact --url used by the site’s administrative address and list users again. Do not guess an account from a display name.

A multisite reset affects the wrong site

Run both the listing and reset with the same --url selector:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp --url=https://example.com/site/ user list
wp --url=https://example.com/site/ user reset-password ADMIN_LOGIN --show-password

Check the site path, domain, and account identifier before accepting the generated password.

The operator cannot find the generated password

--show-password displays the generated value, while --porcelain emits only that value. If neither option was used, the password was intentionally not printed. Do not assume that the notification email contains it; the default email reports the change but does not include the new password. If policy permits, perform one new reset with a prearranged secure handoff rather than searching uncontrolled logs.

The account owner did not receive an email

First check whether --skip-email was supplied. If it was, the missing message is expected and you must use the alternative notification path. If it was not, preserve the command result and follow your mail-delivery troubleshooting process, while keeping the password out of email unless your security policy explicitly permits that channel.

A command-line audit log contains a password

Stop sharing the log and treat the exposed value as compromised. Reset the account again using --prompt=user_pass or a controlled generated-password flow, then remove or restrict the accidental copy according to your incident procedures. The purpose of --prompt=user_pass is specifically to avoid putting a chosen password in shell history.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

10. Security checklist for an operational reset

  1. Confirm the requestor’s identity and the account that must be recovered.
  2. Use wp user list to verify the login, email, or ID.
  3. Confirm the WordPress path, remote target, and multisite URL before changing anything.
  4. Prefer wp user update ADMIN_LOGIN --prompt=user_pass when an operator must choose the password.
  5. Use wp user reset-password when a generated value is preferable, and decide in advance how it will be handed off.
  6. Treat --show-password and --porcelain output as sensitive plaintext.
  7. Use --skip-email only when suppressing the notification is deliberate and an alternative has been arranged.
  8. Check the command result and confirm sign-in without recording the password in shared systems.
  9. Rotate temporary credentials again when your policy calls for post-recovery rotation.
  10. Verify command flags against the WP-CLI version installed on the server before a production run.

Command reference at a glance

These are the core forms, with scope options shown separately so they can be combined consistently:

# List users from the current installation
wp user list

# List administrator IDs
wp user list --format=ids --role=administrator

# Choose a password interactively
wp user update ADMIN_LOGIN --prompt=user_pass

# Generate and display a password
wp user reset-password ADMIN_LOGIN --show-password

# Generate password-only output
wp user reset-password ADMIN_LOGIN --porcelain

# Select a multisite site
wp --url=https://example.com/site/ user reset-password ADMIN_LOGIN --show-password

# Select a WordPress path
wp --path=/path/to/wordpress user update ADMIN_LOGIN --prompt=user_pass

Use one verified account identifier, one verified installation context, and one deliberate notification decision for each reset. That combination avoids the two most serious operational errors: changing the wrong account and exposing the new credential while trying to deliver it.

Version and documentation notes

WP-CLI command pages are regenerated at every release. Before using a flag in production, run the command’s local help or consult documentation matching the installed version. The password-reset guidance maintained by WordPress Developer Resources was last updated March 27, 2026, and its recommendations on prompting for passwords, handling displayed output, and controlling email notifications remain the relevant safety considerations for this workflow.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.