{"id":2141,"date":"2016-06-30T18:10:01","date_gmt":"2016-06-30T22:10:01","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2141"},"modified":"2017-04-19T16:02:51","modified_gmt":"2017-04-19T20:02:51","slug":"change-wordpress-admin-password-email-linux","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/","title":{"rendered":"How To Change WordPress Admin Password and Email from Linux command line"},"content":{"rendered":"<p>WordPress&#8217; web-based installer and administrative interface is powerful, letting you perform most essential tasks from the comfort of your browser. Even so, it is easy to render this system difficult or impossible to use in a number of ways. One such is forgetting your administrative password, losing access to your administrative email address, or breaking the server such that it can no longer send outbound email so you can recover lost credentials. If any of these things happens to you, it is possible to change these configuration values directly in the database using the Linux command line.<\/p>\n<h2>Getting Started<\/h2>\n<p>To complete this guide, you will need the following:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Server<\/a>) with any Linux distribution installed.<br \/>\n\u2022 WordPress previously installed. <\/p>\n<p>While we&#8217;ll work to preserve things should anything go wrong, realize that your login credentials will be changed if you follow these steps, so take appropriate precautions so you can log in later.<\/p>\n<h2>Tutorial<\/h2>\n<p>Before we begin, let&#8217;s back up your WordPress database. These steps should be safe to perform, but having a backup is a good practice to follow before performing any operations on the database layer.<\/p>\n<p><code>mysqldump -u root -p wpdatabase > \/root\/wpdatabase.sql<\/code><\/p>\n<p>Start by accessing the MySQL console. You&#8217;ll be prompted for your MySQL root password.<\/p>\n<p><code>mysql -u root -p<\/code><\/p>\n<p>At the console, access your WordPress database. From this point onward, any commands you send will run on this database.<\/p>\n<p><code>use wpdatabase;<\/code><\/p>\n<p>We&#8217;ll now verify your user details to ensure that we know which records to update later.<\/p>\n<p><code>SELECT ID, user_login, user_pass FROM wp_users;<\/code><\/p>\n<p>Next we&#8217;ll manually update your administrator password. You can update your email address and password independently, depending on which task you need to perform.<\/p>\n<p><code>UPDATE `wp_users` SET `user_pass` = MD5('new_password_here') WHERE `wp_users`.`user_login` = \"admin\";<\/code><\/p>\n<p>Now we&#8217;ll update your administrative email address. (optional)<\/p>\n<p><code>UPDATE `wp_users` SET `user_email` = \"new@email_address.tld\" WHERE `wp_users`.`user_login` = \"admin\";<\/code><\/p>\n<p>At this point you&#8217;ve reset your necessary login credentials. You can now successfully log in with the email address and password you&#8217;ve just configured.<\/p>\n<h2>Conclusion<\/h2>\n<p>WordPress&#8217; web interface is usually more than capable. If it ever fails you, though, then it is useful to fall back on the MySQL console to make necessary configuration changes. If this guide was helpful to you, kindly share it with others who may also be interested. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>WordPress&#8217; web-based installer and administrative interface is powerful, letting you perform most essential tasks from the comfort of your browser. Even so, it is easy to render this system difficult or impossible to use in a number of ways. One such is forgetting your administrative password, losing access to your administrative email address, or breaking<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-2141","post","type-post","status-publish","format-standard","hentry","category-web-hosting","applications-wordpress2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Change WordPress Admin Password and Email from Linux command line - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will walk you through the process of changing your Wordpress Admin Password and Email from Linux command line. Read now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Change WordPress Admin Password and Email from Linux command line - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will walk you through the process of changing your Wordpress Admin Password and Email from Linux command line. Read now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-30T22:10:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-19T20:02:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/change-wordpress-admin-password-email-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/change-wordpress-admin-password-email-linux\\\/\"},\"author\":{\"name\":\"GloboTech Communications\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"headline\":\"How To Change WordPress Admin Password and Email from Linux command line\",\"datePublished\":\"2016-06-30T22:10:01+00:00\",\"dateModified\":\"2017-04-19T20:02:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/change-wordpress-admin-password-email-linux\\\/\"},\"wordCount\":364,\"commentCount\":0,\"articleSection\":[\"Web Hosting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/change-wordpress-admin-password-email-linux\\\/\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/change-wordpress-admin-password-email-linux\\\/\",\"name\":\"How To Change WordPress Admin Password and Email from Linux command line - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\"},\"datePublished\":\"2016-06-30T22:10:01+00:00\",\"dateModified\":\"2017-04-19T20:02:51+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will walk you through the process of changing your Wordpress Admin Password and Email from Linux command line. Read now!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/change-wordpress-admin-password-email-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/change-wordpress-admin-password-email-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/change-wordpress-admin-password-email-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Change WordPress Admin Password and Email from Linux command line\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\\\/\\\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Change WordPress Admin Password and Email from Linux command line - Globo.Tech","description":"This tutorial will walk you through the process of changing your Wordpress Admin Password and Email from Linux command line. Read now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/","og_locale":"en_US","og_type":"article","og_title":"How To Change WordPress Admin Password and Email from Linux command line - Globo.Tech","og_description":"This tutorial will walk you through the process of changing your Wordpress Admin Password and Email from Linux command line. Read now!","og_url":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/","og_site_name":"Globo.Tech","article_published_time":"2016-06-30T22:10:01+00:00","article_modified_time":"2017-04-19T20:02:51+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/#article","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/"},"author":{"name":"GloboTech Communications","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"headline":"How To Change WordPress Admin Password and Email from Linux command line","datePublished":"2016-06-30T22:10:01+00:00","dateModified":"2017-04-19T20:02:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/"},"wordCount":364,"commentCount":0,"articleSection":["Web Hosting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/","url":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/","name":"How To Change WordPress Admin Password and Email from Linux command line - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-06-30T22:10:01+00:00","dateModified":"2017-04-19T20:02:51+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will walk you through the process of changing your Wordpress Admin Password and Email from Linux command line. Read now!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/change-wordpress-admin-password-email-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How To Change WordPress Admin Password and Email from Linux command line"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=2141"}],"version-history":[{"count":5,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2141\/revisions"}],"predecessor-version":[{"id":2871,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2141\/revisions\/2871"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}