October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Reset a WordPress Admin Password with WP-CLI

Use WP-CLI to reset a WordPress admin password without editing database tables. This guide covers account identification, interactive and generated passwords, multisite URLs, remote paths, notifications, and secure handling.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The safest WP-CLI reset depends on whether you want to choose the new password or have WP-CLI generate one. From the WordPress installation, identify the account with wp user list, then either run wp user update ADMIN_LOGIN --prompt=user_pass for an interactive password prompt or wp user reset-password ADMIN_LOGIN --show-password for a generated password. Use --path, --url, or --ssh when the installation is not the current local site, and treat every displayed password as sensitive plaintext.

Choose the reset method before changing anything

WP-CLI changes the WordPress user record through WordPress itself instead of 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.” That makes it useful when you can access the server but cannot use the normal login screen, or when an administrator account needs to be changed during an operational recovery.

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.
Need Command pattern What happens Main handling concern
You choose the password wp user update ADMIN_LOGIN --prompt=user_pass WP-CLI prompts for the new value instead of placing it on the command line. Protect the interactive terminal and the password you enter.
WP-CLI chooses the password wp user reset-password ADMIN_LOGIN --show-password A new password is generated and displayed so you can deliver it through an approved channel. Terminal output, logs, screenshots, and support sessions can expose it.
Several accounts must be reset wp user reset-password USER_IDS One or more logins or IDs can be supplied. Confirm every identifier before changing credentials.
The site is in a multisite network wp --url=https://example.com/site/ user reset-password ADMIN_LOGIN --show-password The command targets the site selected by --url. A correct account on the wrong site is still the wrong reset.

Do not choose --skip-email automatically. The generated-password flow normally emails the user that the password changed, but the email does not contain the new password. Suppressing that notification is appropriate only when you have deliberately arranged another notification path.

Check access and locate the WordPress installation

Run WP-CLI from the directory containing the WordPress files, or provide that location with the global --path parameter. The command must operate on the intended installation; running it from a different site can produce a valid-looking result for the wrong database.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Use the current installation directory

  1. Open a shell on the server or environment that has WP-CLI and access to the WordPress files.
  2. Change to the installation directory.
  3. Run wp user list to confirm that WP-CLI can load the site and list its users.

Supply an explicit path

If changing directories is inconvenient, add --path=/path/to/wordpress to the command. Keep the path tied to the site you intend to repair. The same global parameter can be used with both user list, user update, and user reset-password.

Use a remote target when required

WP-CLI also provides the global --ssh parameter for executing against a remote server or container. Use the connection target and authentication method already approved for your environment, then apply the same user command on that remote target. Do not copy a password into an untrusted local terminal merely because the WordPress files are remote.

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

Identify the correct administrator account

The reset command accepts a user login, email address, or numeric ID. Identification is therefore the most important step before changing credentials. A display name is not a safe substitute unless it is also the account’s login, email, or ID.

List users and inspect the identifiers

  1. Run wp user list.
  2. Compare the listed login, email, and ID with the administrator identity you are trying to recover.
  3. Use the confirmed login, email, or ID as ADMIN_LOGIN in the next command.

When several accounts have administrator privileges, you can ask WP-CLI for their IDs with:

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

The resulting IDs can be passed to wp user reset-password. Review the entire list before executing a multi-user reset; a role-derived list is a scope selector, not an account verification step.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Resolve ambiguity before proceeding

  • If two accounts have similar names, match the email address and ID, not just a familiar login.
  • If the account is on a multisite network, identify the site first and then verify the user in that site context.
  • If the expected account is absent, stop and check the installation path, database selection, and multisite URL rather than resetting a different account.

Set a password you choose with wp user update

Use wp user update when policy requires a particular password or when you will deliver a value through a controlled process. The command accepts a login, email, or ID. Its safer interactive form is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp user update ADMIN_LOGIN --prompt=user_pass
  1. Replace ADMIN_LOGIN with the confirmed login, email, or ID.
  2. Run the command from the correct WordPress installation, or add the appropriate --path, --url, or --ssh global parameter.
  3. When WP-CLI prompts for user_pass, enter the new password interactively rather than adding it to the command line.
  4. Complete the command and protect the terminal session until the operation has finished.

The prompt form keeps the chosen password out of shell history. By contrast, putting a value directly in a command such as --user_pass=<password> can leave that value in command history or other process-recording systems. The update command also supports --skip-email; use it only when suppressing the change notification is intentional.

Generate a new password with wp user reset-password

Use wp user reset-password when you want WP-CLI to create the new credential. The command resets one or more users identified by login or ID:

wp user reset-password ADMIN_LOGIN --show-password
  1. Substitute the verified administrator login or ID.
  2. Run the command against the intended installation and site.
  3. Capture the generated value only through an approved secure channel.
  4. Give the administrator the password using that channel, then sign in and rotate it if your policy requires a further change.

--show-password is what makes the generated value visible in command output. The official guidance warns that plain-text output can be exposed in terminal history or scrollback, logs, screenshots, and shared support sessions. Treat the output as a secret immediately; do not paste it into a ticket, chat room, screen recording, or general-purpose log.

Use password-only output only when your handling is controlled

The command reference also provides --porcelain, which outputs only the password. That format can help a tightly controlled automation step consume the value, but it is still plaintext. It does not encrypt, redact, or otherwise make the credential safe to store. Any script or pipeline that captures it must protect and delete the value according to your security policy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Understand the default notification

Without --skip-email, the generated-password flow emails the user that the password changed. The notification confirms the change but does not include the new password. Add --skip-email only if the absence of that message is deliberate and the user will be informed another way.

Reset all administrators only when the scope is deliberate

For a controlled multi-account operation, first obtain the administrator IDs:

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

Then pass the reviewed IDs to wp user reset-password. Because the reset command accepts one or more users, this can change several accounts in one invocation. The role filter may include service or emergency accounts that are not part of your immediate recovery plan, so inspect the IDs and decide whether each account should be reset before supplying them.

If you need different passwords, notification choices, or delivery arrangements for individual administrators, reset them separately. A single bulk command gives you less opportunity to apply account-specific handling.

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

Target the right site in WordPress multisite

In a multisite network, include the site’s URL with the global --url parameter. The documented form is:

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
wp --url=https://example.com/site/ user reset-password ADMIN_LOGIN --show-password

The URL selects the site context for the user command. Verify the URL, then verify the account identifier in that context before resetting the password. Omitting --url can leave you operating on the default site rather than the site where the administrator needs access.

You can combine the site selector with an explicit installation path when the files are not the current working directory. The same principle applies to remote execution: select the intended remote environment with --ssh and the intended site with --url before changing credentials.

Handle passwords and notifications safely

Keep chosen passwords out of shell history

Use --prompt=user_pass with wp user update rather than writing a password in the command itself. This is the specific practice recommended by the WordPress administration guidance for avoiding shell-history exposure.

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.

Control generated-password output

  • Use --show-password only when you have a secure way to receive and transmit the displayed value.
  • Treat --porcelain output as equally sensitive even though it contains only the password.
  • Do not leave the value in terminal scrollback, screenshots, logs, support recordings, or copied command transcripts.
  • After delivery, sign in and rotate the password if organizational policy requires the recipient to replace the temporary credential.

Make the email decision explicit

The normal generated-password workflow sends a change notification, while --skip-email suppresses it. Record why suppression is needed before using the flag. If the notification is suppressed, arrange a separate approved message that does not expose the password itself.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify access after the reset

  1. Confirm that the command targeted the intended path, site URL, and account.
  2. Deliver any generated password through the approved secure channel, or give the administrator the chosen password according to your access procedure.
  3. Sign in through the WordPress login page with the affected account.
  4. If the sign-in succeeds, change the password again when policy calls for a user-selected long-term credential after recovery.
  5. Remove or expire any temporary copy of the password from the channel used for delivery.

Successful command execution alone is not proof that the person is using the intended site. The login test should be performed against the site selected during the reset, particularly in a multisite network.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Troubleshoot common reset failures

WP-CLI cannot find the WordPress installation

Change into the directory containing the WordPress files or add --path=/path/to/wordpress. If the site is remote, use the approved --ssh target. Re-run wp user list before attempting a password change; the user list is a practical confirmation that WP-CLI is attached to the expected installation.

The account cannot be located

Run wp user list and match the account by login, email, or ID. If it is missing, check that you selected the correct path and, for multisite, the correct --url. Do not guess an administrator login or reset the first account that appears.

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.

The wrong site was selected in multisite

Add the documented --url=https://example.com/site/ selector before user, then list users in that site context and repeat the identity check. A reset performed without the correct site selector may affect a different site than the one the administrator is trying to access.

The password appeared in logs or a transcript

Assume the exposed value is compromised. Use the reset procedure again, preferably with wp user update ADMIN_LOGIN --prompt=user_pass so the replacement is not placed in shell history. Revoke or remove the exposed transcript according to your incident-handling policy, and deliver the replacement through an approved channel.

The user did not receive an email

Check whether --skip-email was used intentionally. The generated-password email does not contain the password, so its absence does not reveal the new value. If notification was suppressed, use the alternate communication process established before the reset.

A bulk reset affects more accounts than expected

Review the output of wp user list --format=ids --role=administrator before passing IDs to the reset command. The administrator role can include accounts that should remain unchanged. Reset individual users when scope, notification, or delivery requirements differ.

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

Use this decision checklist

  • Correct installation: You are in the WordPress directory or have supplied --path.
  • Correct remote target: If applicable, the approved --ssh destination is selected.
  • Correct site: In multisite, --url names the site being repaired.
  • Correct account: The login, email, or ID was confirmed with wp user list.
  • Chosen or generated: Use wp user update --prompt=user_pass for a chosen password; use wp user reset-password for a generated one.
  • Output protected: Treat --show-password and --porcelain as plaintext secrets.
  • Notification decided: Use --skip-email only when suppressing the change email is deliberate.
  • Access verified: The administrator can sign in to the intended site after the reset.

WP-CLI version and command-reference notes

WP-CLI command documentation is regenerated at every release. Flag behavior should therefore be checked against the WP-CLI version installed in the environment before a production reset, especially when a script depends on output formatting or notification options. The WordPress password-reset guidance was first published on November 6, 2018, and last updated on March 27, 2026; the operational principles remain the same, but installed command versions are the authority for the exact options available to your deployment.

The essential pattern is unchanged: identify the account, select the correct installation and site, choose an interactive password or generate one, protect any plaintext output, make the email decision consciously, and verify the resulting login.

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.

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 quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
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.