{"id":1726,"date":"2022-10-03T15:10:46","date_gmt":"2022-10-03T15:10:46","guid":{"rendered":"https:\/\/localwp.com\/?post_type=help&#038;p=1726"},"modified":"2026-06-03T12:46:31","modified_gmt":"2026-06-03T12:46:31","slug":"reset-a-local-sites-wordpress-admin-password","status":"publish","type":"help","link":"https:\/\/localwp.com\/help-docs\/troubleshooting\/reset-a-local-sites-wordpress-admin-password\/","title":{"rendered":"Reset a WordPress admin password"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you don&#8217;t have an admin login or you simply forgot your admin password, this doc will go over how you can gain access to the WordPress admin for a Local site on your computer using WP-CLI.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group help-doc-toc\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">Table of Contents:<\/p>\n\n\n<nav aria-label=\"Table of Contents\" class=\"wp-block-table-of-contents\"><ol><li><a class=\"wp-block-table-of-contents__entry\" href=\"#start-here-1\">Start Here<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"#reset-a-current-user-s-password\">Reset a current user&#039;s password<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"#create-a-new-user-and-password\">Create a new user and password<\/a><\/li><\/ol><\/nav>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-text-color\" id=\"start-here-1\" style=\"color:#000000\"><strong>Start Here<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Right-click on the site in Local&#8217;s sidebar and click &#8220;<strong>Open site shell<\/strong>.&#8221;<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-drop-shadow\"><img decoding=\"async\" width=\"1024\" height=\"655\" src=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-open-site-shell-1024x655.png\" alt=\"Open site shell to use WP-CLI on your site.\" class=\"wp-image-1814\" srcset=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-open-site-shell-1024x655.png 1024w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-open-site-shell-300x192.png 300w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-open-site-shell-768x491.png 768w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-open-site-shell.png 1272w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-text-color\" id=\"reset-a-current-user-s-password\" style=\"color:#000000\"><strong>Reset a current user&#8217;s password<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;d to <strong>reset the password for a current<\/strong> <strong>administrator<\/strong> on the site, but don&#8217;t know the username run: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>wp user list<\/code>  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will generate a list of users currently on the site.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-drop-shadow\"><img decoding=\"async\" width=\"1024\" height=\"344\" src=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-wp-user-list-1024x344.png\" alt=\"\" class=\"wp-image-1817\" srcset=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-wp-user-list-1024x344.png 1024w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-wp-user-list-300x101.png 300w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-wp-user-list-768x258.png 768w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-wp-user-list-1536x516.png 1536w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-wp-user-list.png 1733w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Once <strong>you know the username<\/strong> you&#8217;d like to reset the password for run: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>wp user update EMAIL@OFCHOICE.LOCAL --user_pass=PASSWORD<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>EMAIL@OFCHOICE.LOCAL<\/code> and <code>PASSWORD<\/code> to your email and new password like the screenshot below.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-drop-shadow\"><img decoding=\"async\" width=\"1024\" height=\"74\" src=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-password-1024x74.png\" alt=\"\" class=\"wp-image-1818\" srcset=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-password-1024x74.png 1024w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-password-300x22.png 300w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-password-768x56.png 768w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-password.png 1488w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div style=\"height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-text-color\" id=\"create-a-new-user-and-password\" style=\"color:#000000\"><strong>Create a new user and password<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you <strong>do not currently have a user and need to create a new one<\/strong> run: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>wp user create USERNAME EMAIL@OFCHOICE.LOCAL --role=administrator<\/code> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace\u00a0<code>USERNAME<\/code>\u00a0and\u00a0<code>EMAIL@OFCHOICE.LOCAL<\/code>\u00a0with the desired username and e-mail like the screenshot below.  <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-drop-shadow\"><img decoding=\"async\" width=\"1024\" height=\"101\" src=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-with-password-1024x101.png\" alt=\"\" class=\"wp-image-1819\" srcset=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-with-password-1024x101.png 1024w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-with-password-300x30.png 300w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-with-password-768x76.png 768w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-with-password.png 1470w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>random password will be generated<\/strong> after the command is ran. If you wish to define a password, you can add the&nbsp;<code>--user_pass<\/code>&nbsp;argument like so:&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>wp user create USERNAME EMAIL@OFCHOICE.LOCAL --role=administrator --user_pass=PASSWORD<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace\u00a0<code>USERNAME<\/code>,\u00a0<code>EMAIL@OFCHOICE.LOCAL<\/code>, and <code>PASSWORD<\/code>\u00a0with the desired username, e-mail, and password.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-drop-shadow\"><img decoding=\"async\" width=\"1024\" height=\"68\" src=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-select-password-1024x68.png\" alt=\"\" class=\"wp-image-1820\" srcset=\"https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-select-password-1024x68.png 1024w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-select-password-300x20.png 300w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-select-password-768x51.png 768w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-select-password-1536x102.png 1536w, https:\/\/localwp.com\/wp-content\/uploads\/2022\/12\/lhd-create-new-user-select-password.png 1695w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Now try logging into the WordPress admin! <\/p>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-fe48e5de wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/community.localwp.com\/c\/support\/5\" target=\"_blank\" rel=\"noreferrer noopener\">Get Community Support<\/a><\/div>\n<\/div>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you don&#8217;t have an admin login or you simply forgot your admin password, this doc will go over how you can gain access to the WordPress admin for a Local site on your computer using WP-CLI. Table of Contents: Start Here Right-click on the site in Local&#8217;s sidebar and click &#8220;Open site shell.&#8221; Reset&#8230;<\/p>\n","protected":false},"author":49,"parent":349,"menu_order":2,"template":"","tags":[],"helpcategories":[],"class_list":["post-1726","help","type-help","status-publish","hentry"],"acf":{"help_keywords":""},"_links":{"self":[{"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/help-doc\/1726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/help-doc"}],"about":[{"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/types\/help"}],"author":[{"embeddable":true,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/users\/49"}],"version-history":[{"count":0,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/help-doc\/1726\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/help-doc\/349"}],"wp:attachment":[{"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/media?parent=1726"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/tags?post=1726"},{"taxonomy":"helpcategories","embeddable":true,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/helpcategories?post=1726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}