{"id":922,"date":"2023-11-14T10:31:13","date_gmt":"2023-11-14T10:31:13","guid":{"rendered":"https:\/\/www.devopsconsulting.in\/blog\/?p=922"},"modified":"2023-12-10T04:24:51","modified_gmt":"2023-12-10T04:24:51","slug":"how-to-change-database-credential-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/","title":{"rendered":"How to change database credential in wordpress"},"content":{"rendered":"\n<p>In WordPress, the database credentials, including the database password, are typically stored in the <code>wp-config.php<\/code> file. This file is located in the root directory of your WordPress installation. Here&#8217;s how you can change the database password in WordPress:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Access the <code>wp-config.php<\/code> file:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Use an FTP client or access your hosting control panel to navigate to the root directory of your WordPress installation.<\/li>\n\n\n\n<li>Look for a file named <code>wp-config.php<\/code> and download it to your local machine.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Open <code>wp-config.php<\/code> in a text editor:<\/strong>\n<ul class=\"wp-block-list\">\n<li>You can use a simple text editor like Notepad (on Windows) or TextEdit (on Mac).<\/li>\n\n\n\n<li>Alternatively, you can use a code editor like Visual Studio Code or Sublime Text for a better experience.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Locate the database connection settings:<\/strong><ul><li>In <code>wp-config.php<\/code>, you&#8217;ll find a section that looks like the following:<\/li><\/ul><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>    \/\/ ** MySQL settings - You can get this info from your web host ** \/\/\n    \/** The name of the database for WordPress *\/\n    define('DB_NAME', 'your_database_name');\n\n    \/** MySQL database username *\/\n    define('DB_USER', 'your_database_user');\n\n    \/** MySQL database password *\/\n    define('DB_PASSWORD', 'your_database_password');\n\n    \/** MySQL hostname *\/\n     define('DB_HOST', 'localhost');\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Update the <code>DB_PASSWORD<\/code> field:<\/strong><ul><li>Change the value inside the single quotes for <code>DB_PASSWORD<\/code> to your new database password.<\/li><\/ul><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>       define('DB_PASSWORD', 'your_new_database_password');<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Save and upload the <code>wp-config.php<\/code> file:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Save the changes you made to the <code>wp-config.php<\/code> file.<\/li>\n\n\n\n<li>If you downloaded the file, upload it back to the root directory of your WordPress installation, replacing the existing file.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>After making these changes, your WordPress site should be able to connect to the database using the new password. Make sure to keep a backup of the original <code>wp-config.php<\/code> file before making any changes, just in case you need to revert to the previous configuration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In WordPress, the database credentials, including the database password, are typically stored in the wp-config.php file. This file is located in the root directory of your WordPress&#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[131],"tags":[174,175],"class_list":["post-922","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-change-database-credential-in-wordpress","tag-reset-database-credential-in-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to change database credential in wordpress - DevOps Consulting<\/title>\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.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to change database credential in wordpress - DevOps Consulting\" \/>\n<meta property=\"og:description\" content=\"In WordPress, the database credentials, including the database password, are typically stored in the wp-config.php file. This file is located in the root directory of your WordPress...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"DevOps Consulting\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-14T10:31:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-10T04:24:51+00:00\" \/>\n<meta name=\"author\" content=\"Abhishek Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/how-to-change-database-credential-in-wordpress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/how-to-change-database-credential-in-wordpress\\\/\"},\"author\":{\"name\":\"Abhishek Singh\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#\\\/schema\\\/person\\\/fc397ba8be42f9fdd53450edfc73006f\"},\"headline\":\"How to change database credential in wordpress\",\"datePublished\":\"2023-11-14T10:31:13+00:00\",\"dateModified\":\"2023-12-10T04:24:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/how-to-change-database-credential-in-wordpress\\\/\"},\"wordCount\":227,\"commentCount\":1,\"keywords\":[\"change database credential in wordpress\",\"reset database credential in wordpress\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/how-to-change-database-credential-in-wordpress\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/how-to-change-database-credential-in-wordpress\\\/\",\"url\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/how-to-change-database-credential-in-wordpress\\\/\",\"name\":\"How to change database credential in wordpress - DevOps Consulting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#website\"},\"datePublished\":\"2023-11-14T10:31:13+00:00\",\"dateModified\":\"2023-12-10T04:24:51+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#\\\/schema\\\/person\\\/fc397ba8be42f9fdd53450edfc73006f\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/how-to-change-database-credential-in-wordpress\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/\",\"name\":\"DevOps Consulting\",\"description\":\"DevOps Consulting | SRE Consulting | DevSecOps Consulting | MLOps Consulting\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#\\\/schema\\\/person\\\/fc397ba8be42f9fdd53450edfc73006f\",\"name\":\"Abhishek Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g\",\"caption\":\"Abhishek Singh\"},\"description\":\"I\u2019m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I\u2019ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains: \u2022 DevOps School \u2013 Tech blogs and tutorials \u2022 Holiday Landmark \u2013 Travel stories and guides \u2022 Stocks Mantra \u2013 Stock market strategies and tips \u2022 My Medic Plus \u2013 Health and fitness guidance \u2022 TrueReviewNow \u2013 Honest product reviews \u2022 Wizbrand \u2013 SEO and digital tools for businesses I\u2019m also exploring the fascinating world of Quantum Computing.\",\"url\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/author\\\/abhishek\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to change database credential in wordpress - DevOps Consulting","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.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to change database credential in wordpress - DevOps Consulting","og_description":"In WordPress, the database credentials, including the database password, are typically stored in the wp-config.php file. This file is located in the root directory of your WordPress...","og_url":"https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/","og_site_name":"DevOps Consulting","article_published_time":"2023-11-14T10:31:13+00:00","article_modified_time":"2023-12-10T04:24:51+00:00","author":"Abhishek Singh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Abhishek Singh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/#article","isPartOf":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/"},"author":{"name":"Abhishek Singh","@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f"},"headline":"How to change database credential in wordpress","datePublished":"2023-11-14T10:31:13+00:00","dateModified":"2023-12-10T04:24:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/"},"wordCount":227,"commentCount":1,"keywords":["change database credential in wordpress","reset database credential in wordpress"],"articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/","url":"https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/","name":"How to change database credential in wordpress - DevOps Consulting","isPartOf":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/#website"},"datePublished":"2023-11-14T10:31:13+00:00","dateModified":"2023-12-10T04:24:51+00:00","author":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.devopsconsulting.in\/blog\/how-to-change-database-credential-in-wordpress\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.devopsconsulting.in\/blog\/#website","url":"https:\/\/www.devopsconsulting.in\/blog\/","name":"DevOps Consulting","description":"DevOps Consulting | SRE Consulting | DevSecOps Consulting | MLOps Consulting","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.devopsconsulting.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f","name":"Abhishek Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g","caption":"Abhishek Singh"},"description":"I\u2019m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I\u2019ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains: \u2022 DevOps School \u2013 Tech blogs and tutorials \u2022 Holiday Landmark \u2013 Travel stories and guides \u2022 Stocks Mantra \u2013 Stock market strategies and tips \u2022 My Medic Plus \u2013 Health and fitness guidance \u2022 TrueReviewNow \u2013 Honest product reviews \u2022 Wizbrand \u2013 SEO and digital tools for businesses I\u2019m also exploring the fascinating world of Quantum Computing.","url":"https:\/\/www.devopsconsulting.in\/blog\/author\/abhishek\/"}]}},"_links":{"self":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/comments?post=922"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/922\/revisions"}],"predecessor-version":[{"id":924,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/922\/revisions\/924"}],"wp:attachment":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/media?parent=922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/categories?post=922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/tags?post=922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}