{"id":277,"date":"2016-02-25T16:40:33","date_gmt":"2016-02-25T21:40:33","guid":{"rendered":"http:\/\/underhost.com\/blog\/?p=277"},"modified":"2026-10-23T08:56:27","modified_gmt":"2026-10-23T12:56:27","slug":"how-to-reset-wordpress-admin-password-via-ssh","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/how-to-reset-wordpress-admin-password-via-ssh\/","title":{"rendered":"How to Reset a WordPress Admin Password (Email, WP-CLI or cPanel)"},"content":{"rendered":"<div class=\"uh-blog-hero\" style=\"margin:0 0 40px;text-align:center;padding:48px 24px;border-radius:20px;background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;box-shadow:0 20px 40px -15px rgba(13,31,60,0.28);position:relative;overflow:hidden;\">\n<div style=\"display:inline-flex;align-items:center;gap:8px;padding:7px 14px;margin-bottom:16px;border:1px solid rgba(0,212,255,0.32);border-radius:999px;color:#DFF8FF;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;background:rgba(0,212,255,0.10);\"><i class=\"fas fa-sliders-h\" style=\"color:#00D4FF;\"><\/i> Control Panels<\/div>\n<h1 style=\"color:#ffffff;font-size:clamp(32px,5vw,46px);line-height:1.12;margin:0 0 14px;font-weight:800;\">How to Reset a WordPress Admin Password (Email, WP-CLI or cPanel)<\/h1>\n<p style=\"font-size:18px;color:#EAF6FF;max-width:800px;margin:0 auto;line-height:1.7;\">Lost access to your WordPress admin account? Reset your password using MySQL commands in cPanel\u2019s command line.<\/p>\n<\/div>\n<div class=\"uh-blog-excerpt\" style=\"border-left:4px solid #00D4FF;padding:18px 20px;margin:0 0 34px;background:#F8FAFC;color:#1F2937;border-radius:0 14px 14px 0;box-shadow:0 8px 28px rgba(13,31,60,0.08);line-height:1.75;\"><strong style=\"color:#0D1F3C;\">Short answer:<\/strong> Try the <strong>Lost your password?<\/strong> link on the login page first. If email does not arrive, reset the password over SSH with WP-CLI: <code>wp user update USERNAME --prompt=user_pass<\/code>. Without SSH, use WordPress Toolkit or Softaculous in cPanel to set a new admin password. If you think the site was hacked, also check the list of admin users and change your keys afterwards.<\/div>\n<nav aria-label=\"Table of contents\" class=\"uh-toc\" style=\"background:#ffffff;border:1px solid #E5E7EB;border-radius:16px;padding:20px 22px;margin:0 0 34px;box-shadow:0 4px 12px rgba(13,31,60,0.08);\">\n<div style=\"font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#176EA5;margin-bottom:10px;\"><i class=\"fas fa-list\" style=\"color:#00D4FF;\"><\/i> In this guide<\/div>\n<ol style=\"margin:0;padding-left:20px;columns:2 260px;column-gap:28px;line-height:1.9;\">\n<li><a href=\"#before-you-start\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Before you start<\/a><\/li>\n<li><a href=\"#method-1-the-reset-email\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Method 1: the reset email<\/a><\/li>\n<li><a href=\"#method-2-wp-cli-over-ssh-fastest\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Method 2: WP-CLI over SSH (fastest)<\/a><\/li>\n<li><a href=\"#method-3-cpanel-tools-no-ssh-needed\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Method 3: cPanel tools (no SSH needed)<\/a><\/li>\n<li><a href=\"#locked-out-by-two-factor-authentication\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Locked out by two-factor authentication<\/a><\/li>\n<li><a href=\"#why-not-edit-the-password-in-phpmyadmin\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Why not edit the password in phpMyAdmin?<\/a><\/li>\n<li><a href=\"#how-wordpress-stores-passwords\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">How WordPress stores passwords<\/a><\/li>\n<li><a href=\"#wordpress-multisite\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">WordPress multisite<\/a><\/li>\n<li><a href=\"#after-you-are-back-in\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">After you are back in<\/a><\/li>\n<li><a href=\"#useful-wp-cli-user-commands\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Useful WP-CLI user commands<\/a><\/li>\n<li><a href=\"#avoid-the-next-lockout\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Avoid the next lockout<\/a><\/li>\n<li><a href=\"#troubleshooting\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Troubleshooting<\/a><\/li>\n<\/ol>\n<\/nav>\n<div class=\"uh-post-content\" style=\"color:#1F2937;font-size:16px;line-height:1.75;\">\n<h2 id=\"before-you-start\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-clipboard-check\" style=\"color:#00D4FF;\"><\/i> Before you start<\/h2>\n<ul style=\"list-style:none;padding-left:0;\">\n<li style=\"margin:0 0 8px;\">\u2713 Know the site&#8217;s address and, if you have it, the admin user name or email.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 For WP-CLI: SSH access to the hosting account, and the path to the WordPress folder.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 For cPanel methods: a cPanel login for the account that hosts the site.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 A recent backup, if you plan to change anything else at the same time.<\/li>\n<\/ul>\n<h2 id=\"method-1-the-reset-email\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-envelope\" style=\"color:#00D4FF;\"><\/i> Method 1: the reset email<\/h2>\n<ol style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Open <code>https:\/\/your-site.com\/wp-login.php?action=lostpassword<\/code>.<\/li>\n<li style=\"margin:0 0 8px;\">Enter the admin user name or email address.<\/li>\n<li style=\"margin:0 0 8px;\">Open the email from WordPress and follow the link to set a new password.<\/li>\n<\/ol>\n<p style=\"margin:0 0 18px;\">If no email arrives, check spam, then check that the site can send email. Many sites need an SMTP plugin to send reliably. If email still fails, use one of the methods below.<\/p>\n<h2 id=\"method-2-wp-cli-over-ssh-fastest\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-tachometer-alt\" style=\"color:#00D4FF;\"><\/i> Method 2: WP-CLI over SSH (fastest)<\/h2>\n<p style=\"margin:0 0 18px;\">WP-CLI is the command-line tool for WordPress. It is available on most cPanel servers. Go to the WordPress folder first:<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>cd ~\/public_html            # or the folder where WordPress is installed\n\n# List admin users\nwp user list --role=administrator --fields=ID,user_login,user_email\n\n# Set a new password. WP-CLI asks for it, so it is not saved in your shell history\nwp user update admin --prompt=user_pass<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Replace <code>admin<\/code> with the user name from the list. To send the user a reset email instead, run <code>wp user reset-password admin<\/code>.<\/p>\n<h3 style=\"color:#0D1F3C;font-size:21px;line-height:1.3;margin:26px 0 10px;\">If you do not know any admin user<\/h3>\n<p style=\"margin:0 0 18px;\">Create a new administrator, log in, then remove or fix the old account:<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>wp user create newadmin you@example.com --role=administrator --prompt=user_pass<\/code><\/pre>\n<h2 id=\"method-3-cpanel-tools-no-ssh-needed\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Method 3: cPanel tools (no SSH needed)<\/h2>\n<p style=\"margin:0 0 18px;\">If the site was installed with an installer in cPanel, you can change the admin password there:<\/p>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><strong>WordPress Toolkit:<\/strong> open WordPress Toolkit, choose the site, and use the admin login or password option for that installation.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Softaculous:<\/strong> open Softaculous, go to <strong>All Installations<\/strong>, edit the site, and enter a new admin password.<\/li>\n<\/ul>\n<p style=\"margin:0 0 18px;\">Both tools change the password through WordPress itself, so the new password is stored securely.<\/p>\n<h2 id=\"locked-out-by-two-factor-authentication\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Locked out by two-factor authentication<\/h2>\n<p style=\"margin:0 0 18px;\">If you know the password but lost the phone or app that gives you the login code, use the backup codes you saved when you set up two-factor authentication. Without them, turn off the two-factor plugin over SSH, log in, and set it up again on your new device:<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>wp plugin list --status=active          # find the two-factor plugin name\nwp plugin deactivate two-factor          # replace with the plugin name from the list<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Without SSH, rename the plugin folder in <code>wp-content\/plugins<\/code> with the cPanel File Manager. WordPress then turns the plugin off. Rename it back after you log in, and turn two-factor authentication on again straight away.<\/p>\n<h2 id=\"why-not-edit-the-password-in-phpmyadmin\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-info-circle\" style=\"color:#00D4FF;\"><\/i> Why not edit the password in phpMyAdmin?<\/h2>\n<p style=\"margin:0 0 18px;\">Old guides tell you to paste an MD5 value into the <code>wp_users<\/code> table. That is no longer good advice. Since WordPress 6.8, passwords are stored with bcrypt, a much stronger method. Editing hashes by hand is easy to get wrong, it can lock you out further, and it bypasses the checks WordPress runs. Use WP-CLI or the cPanel tools instead.<\/p>\n<h2 id=\"how-wordpress-stores-passwords\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-info-circle\" style=\"color:#00D4FF;\"><\/i> How WordPress stores passwords<\/h2>\n<p style=\"margin:0 0 18px;\">WordPress never stores your password itself. It stores a hash: a one-way scramble that can be checked against what you type but cannot be turned back into the password. Since version 6.8, WordPress uses bcrypt for this. Older hashes are upgraded the next time each user logs in. The secret keys and salts in <code>wp-config.php<\/code> protect login cookies, which is why changing them logs everyone out.<\/p>\n<h2 id=\"wordpress-multisite\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> WordPress multisite<\/h2>\n<p style=\"margin:0 0 18px;\">On a multisite network, users are shared across all sites, so the WP-CLI commands above work for the whole network. To see who can manage the network, list the super admins:<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>wp super-admin list<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Reset a super admin&#8217;s password the same way, with <code>wp user update USERNAME --prompt=user_pass<\/code>.<\/p>\n<h2 id=\"after-you-are-back-in\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> After you are back in<\/h2>\n<p style=\"margin:0 0 18px;\">If you lost access because something was wrong, not just a forgotten password, check these straight away:<\/p>\n<ol style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><strong>Look at the user list.<\/strong> Remove any administrator you do not recognise.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Change passwords<\/strong> for every admin, and for the cPanel and database accounts if you think they leaked.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Change the security keys<\/strong> in <code>wp-config.php<\/code>. With WP-CLI: <code>wp config shuffle-salts<\/code>. This logs everyone out.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Update WordPress, themes and plugins<\/strong>, and remove any you do not use.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Turn on two-factor authentication<\/strong> for admin accounts.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Scan for malware<\/strong> if anything looks unusual, such as new files or redirects.<\/li>\n<\/ol>\n<p style=\"margin:0 0 18px;\">See our <a href=\"https:\/\/underhost.com\/blog\/wordpress-backdoor-alert-30-plugins-compromised-is-your-website-at-risk\/\">WordPress backdoor alert<\/a> for signs of a compromised site, and our <a href=\"https:\/\/underhost.com\/blog\/wordpress-password-reset-the-easiest-way\/\">short password reset checklist<\/a> for a quick reference.<\/p>\n<h2 id=\"useful-wp-cli-user-commands\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Useful WP-CLI user commands<\/h2>\n<div style=\"overflow-x:auto;margin:26px 0;border:1px solid #E5E7EB;border-radius:14px;-webkit-overflow-scrolling:touch;\">\n<table style=\"width:100%;border-collapse:collapse;background:#ffffff;color:#1F2937;font-size:15px;line-height:1.55;margin:0;\">\n<thead>\n<tr style=\"background:#0D1F3C;color:#fff;\">\n<th style=\"padding:14px;text-align:left;\">Task<\/th>\n<th style=\"padding:14px;text-align:left;\">Command<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">List all users with their roles<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>wp user list --fields=ID,user_login,user_email,roles<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Send a password reset email<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>wp user reset-password USERNAME<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Give an existing user the admin role<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>wp user set-role USERNAME administrator<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Remove an unknown admin and give their posts to you<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>wp user delete BADUSER --reassign=1<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Log out every user<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>wp config shuffle-salts<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"avoid-the-next-lockout\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-exclamation-triangle\" style=\"color:#00D4FF;\"><\/i> Avoid the next lockout<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><strong>Store the password in a password manager,<\/strong> so it is never lost or reused on other sites.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Keep a second administrator account<\/strong> for a trusted person, with its own strong password.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Make sure the site can send email,<\/strong> so reset emails arrive. An SMTP plugin with a proper mail service is the most reliable option.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Save the two-factor backup codes<\/strong> when you turn on two-factor authentication, somewhere safe and offline.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Limit login attempts<\/strong> with a security plugin or server firewall, so password-guessing bots are blocked.<\/li>\n<\/ul>\n<h2 id=\"troubleshooting\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-exclamation-triangle\" style=\"color:#00D4FF;\"><\/i> Troubleshooting<\/h2>\n<div style=\"overflow-x:auto;margin:26px 0;border:1px solid #E5E7EB;border-radius:14px;-webkit-overflow-scrolling:touch;\">\n<table style=\"width:100%;border-collapse:collapse;background:#ffffff;color:#1F2937;font-size:15px;line-height:1.55;margin:0;min-width:600px;\">\n<thead>\n<tr style=\"background:#0D1F3C;color:#fff;\">\n<th style=\"padding:14px;text-align:left;\">Problem<\/th>\n<th style=\"padding:14px;text-align:left;\">Likely cause<\/th>\n<th style=\"padding:14px;text-align:left;\">Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>wp: command not found<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">WP-CLI is not installed or not on the path<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Use the cPanel tools instead, or ask support to enable WP-CLI.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>Error: This does not seem to be a WordPress installation<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">You are in the wrong folder<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Change to the folder that contains wp-config.php, or add <code>--path=\/home\/user\/public_html<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">New password does not work<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">A security plugin blocks the login, or the browser filled in the old password<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Clear the saved password, then check the security plugin&#8217;s lockout list.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">You are logged out again straight away<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Old cookies after changing the keys<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Clear the browser cookies for the site and log in again.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div aria-hidden=\"true\" class=\"uh-section-divider\" style=\"width:min(100% - 32px, 1080px);margin:44px auto;display:grid;grid-template-columns:1fr 32px 1fr;align-items:center;gap:18px;pointer-events:none;\"><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(0,212,255,0.40),rgba(23,110,165,0.24),transparent);\"><\/span><img alt=\"\" decoding=\"async\" height=\"32\" loading=\"lazy\" src=\"https:\/\/cdn.underhost.com\/android-chrome-192x192.webp\" style=\"width:32px;height:32px;display:block;border-radius:8px;filter:drop-shadow(0 0 14px rgba(0,212,255,0.30));\" width=\"32\"\/><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(23,110,165,0.24),rgba(0,212,255,0.40),transparent);\"><\/span><\/div>\n<\/div>\n<div class=\"uh-blog-cta\" style=\"background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;padding:36px 24px;border-radius:20px;text-align:center;margin:44px 0;box-shadow:0 20px 40px -15px rgba(13,31,60,0.32);\">\n<h2 style=\"margin:0 0 12px;font-size:28px;line-height:1.25;color:#ffffff;\">Need help with this?<\/h2>\n<p style=\"font-size:17px;margin:0 auto 22px;color:#EAF6FF;max-width:720px;line-height:1.7;\">Locked out, or worried your site was hacked? Our team can restore access and clean the site.<\/p>\n<p><a href=\"https:\/\/underhost.com\/server-management.php\" style=\"background:linear-gradient(90deg,#00D4FF,#0077FF);color:#ffffff;padding:13px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;\">See server management plans<\/a><a href=\"https:\/\/customerpanel.ca\/client\/\" style=\"background:transparent;color:#ffffff;padding:12px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;border:1px solid rgba(255,255,255,0.32);\">Contact @CustomerPanel<\/a><\/div>\n<div class=\"uh-faq-section\" id=\"faq\" style=\"margin:34px 0;scroll-margin-top:90px;\">\n<h2 style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:0 0 18px;border-bottom:2px solid rgba(0,212,255,0.22);padding-bottom:10px;\">Frequently asked questions<\/h2>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">How do I reset a WordPress password without email?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Use WP-CLI over SSH with wp user update USERNAME &#8211;prompt=user_pass, or set a new password in WordPress Toolkit or Softaculous in cPanel.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Is it safe to change the password in phpMyAdmin?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">It is not recommended. WordPress uses bcrypt hashing since version 6.8, and editing hashes by hand is easy to get wrong. WP-CLI and the cPanel tools change the password safely.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">What if I do not know the admin user name?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Run wp user list &#8211;role=administrator with WP-CLI to see the admin accounts, or create a new administrator with wp user create.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Should I do anything else after resetting the password?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Yes, if you suspect a hack: remove unknown admin users, change all passwords, shuffle the security keys, update everything, and turn on two-factor authentication.<\/p>\n<\/div>\n<\/div>\n<p><!-- uh-related-start --><\/p>\n<div style=\"background:#F4F8FC;border:1px solid #DCE7F3;border-radius:14px;padding:18px 22px;margin:32px 0 8px;\">\n<h2 style=\"margin:0 0 12px;font-size:22px;\">Related guides<\/h2>\n<ul style=\"margin:0;padding-left:20px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/wordpress-password-reset-the-easiest-way\/\">WordPress Password Reset: Safe Ways to Regain Admin Access<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/wordpress-made-easy-how-to-use-wordpress-toolkit-for-hassle-free-management\/\">WordPress Made Easy: How to Use WordPress Toolkit for Hassle-Free Management<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/optimizing-database-performance-in-cpanel-for-faster-sites\/\">Optimizing Database Performance in cPanel for Faster Sites<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-password-protect-directories-detailed-tutorial\/\">How to Password Protect Directories in cPanel<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/lend-hand-gutenberg-wordpress-4-9-1\/\">Lend a Hand with Gutenberg\u00a0&#8211; WordPress 4.9.1<\/a><\/li>\n<\/ul>\n<\/div>\n<p><!-- uh-related-end --><br \/>\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"How do I reset a WordPress password without email?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Use WP-CLI over SSH with wp user update USERNAME --prompt=user_pass, or set a new password in WordPress Toolkit or Softaculous in cPanel.\"}}, {\"@type\": \"Question\", \"name\": \"Is it safe to change the password in phpMyAdmin?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"It is not recommended. WordPress uses bcrypt hashing since version 6.8, and editing hashes by hand is easy to get wrong. WP-CLI and the cPanel tools change the password safely.\"}}, {\"@type\": \"Question\", \"name\": \"What if I do not know the admin user name?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Run wp user list --role=administrator with WP-CLI to see the admin accounts, or create a new administrator with wp user create.\"}}, {\"@type\": \"Question\", \"name\": \"Should I do anything else after resetting the password?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes, if you suspect a hack: remove unknown admin users, change all passwords, shuffle the security keys, update everything, and turn on two-factor authentication.\"}}]}<\/script><\/p>\n<h2 id=\"sources\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-book\" style=\"color:#00D4FF;\"><\/i> Sources<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/developer.wordpress.org\/cli\/commands\/user\/update\/\">WP-CLI: wp user update<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/developer.wordpress.org\/cli\/commands\/config\/shuffle-salts\/\">WP-CLI: wp config shuffle-salts<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/reset-your-password\/\">WordPress: resetting your password<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Lost access to your WordPress admin account? Reset your password using MySQL commands in cPanel\u2019s command line.<\/p>\n","protected":false},"author":1,"featured_media":4628,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,202,204],"tags":[125,108,185,116],"class_list":["post-277","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-control-panels","category-cpanel-whm","category-software-cms","tag-tag-backups","tag-tag-cpanel","tag-php","tag-tag-wordpress"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/277","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=277"}],"version-history":[{"count":12,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions"}],"predecessor-version":[{"id":6952,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions\/6952"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4628"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}