{"id":2793,"date":"2026-10-06T18:01:20","date_gmt":"2026-10-06T12:31:20","guid":{"rendered":"https:\/\/ehostpiya.in\/blog\/?p=2793"},"modified":"2026-10-06T18:01:23","modified_gmt":"2026-10-06T12:31:23","slug":"how-to-change-magento-database-credentials","status":"publish","type":"post","link":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/","title":{"rendered":"How to Change Magento Database Credentials"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_88 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#How_to_Change_Magento_Database_Credentials\" >How to Change Magento Database Credentials<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#What_Are_Magento_Database_Credentials\" >What Are Magento Database Credentials?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#When_Should_You_Change_Magento_Database_Credentials\" >When Should You Change Magento Database Credentials?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Before_Changing_the_Credentials\" >Before Changing the Credentials<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_1_Locate_Your_Magento_Installation\" >Step 1: Locate Your Magento Installation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_2_Back_Up_envphp\" >Step 2: Back Up env.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_3_Check_the_Existing_Database_Credentials\" >Step 3: Check the Existing Database Credentials<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_4_Create_or_Change_the_Database_User\" >Step 4: Create or Change the Database User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_5_Test_the_New_Database_Credentials\" >Step 5: Test the New Database Credentials<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_6_Put_Magento_Into_Maintenance_Mode\" >Step 6: Put Magento Into Maintenance Mode<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_7_Update_appetcenvphp\" >Step 7: Update app\/etc\/env.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_8_Check_the_Configuration_Syntax\" >Step 8: Check the Configuration Syntax<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_9_Test_Magentos_Database_Connection\" >Step 9: Test Magento&#8217;s Database Connection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_10_Run_a_Magento_Command\" >Step 10: Run a Magento Command<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_11_Test_the_Storefront\" >Step 11: Test the Storefront<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_12_Test_the_Magento_Admin\" >Step 12: Test the Magento Admin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_13_Check_Magento_Logs\" >Step 13: Check Magento Logs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Step_14_Disable_Maintenance_Mode\" >Step 14: Disable Maintenance Mode<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Changing_Database_Credentials_in_DirectAdmin\" >Changing Database Credentials in DirectAdmin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Changing_Database_Credentials_on_cPanel\" >Changing Database Credentials on cPanel<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#How_to_Change_Only_the_Database_Password\" >How to Change Only the Database Password<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#How_to_Change_the_Database_Name\" >How to Change the Database Name<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#How_to_Change_the_Database_Host\" >How to Change the Database Host<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Common_Errors_After_Changing_Magento_Database_Credentials\" >Common Errors After Changing Magento Database Credentials<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Access_Denied_for_User\" >Access Denied for User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Unknown_Database\" >Unknown Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Cant_Connect_to_MySQL_Server\" >Can&#8217;t Connect to MySQL Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Magento_Shows_a_500_Error\" >Magento Shows a 500 Error<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Security_Best_Practices\" >Security Best Practices<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Use_a_Strong_Password\" >Use a Strong Password<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Use_a_Dedicated_Database_User\" >Use a Dedicated Database User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Grant_Only_Required_Permissions\" >Grant Only Required Permissions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Protect_envphp\" >Protect env.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Avoid_Sharing_Credentials\" >Avoid Sharing Credentials<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Rotate_Exposed_Credentials\" >Rotate Exposed Credentials<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-36\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Keep_Backups_Secure\" >Keep Backups Secure<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-37\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Quick_Command_Reference\" >Quick Command Reference<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-38\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Magento_Database_Credential_Change_Checklist\" >Magento Database Credential Change Checklist<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-39\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Change_Magento_Database_Credentials\"><\/span>How to Change Magento Database Credentials<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Magento stores important information such as products, customers, orders, configurations, and CMS content in its database. To connect to that database, Magento uses credentials defined in the <code>app\/etc\/env.php<\/code> file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you change your database name, database username, database password, or database host, you must update Magento&#8217;s database configuration accordingly. Otherwise, the storefront and Admin Panel may display database connection errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide explains how to safely change Magento database credentials on a Linux server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Are_Magento_Database_Credentials\"><\/span>What Are Magento Database Credentials?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Magento&#8217;s database connection information is stored in:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A typical configuration looks similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'db' =&gt; &#91;\n    'connection' =&gt; &#91;\n        'default' =&gt; &#91;\n            'host' =&gt; 'localhost',\n            'dbname' =&gt; 'magento',\n            'username' =&gt; 'magento_user',\n            'password' =&gt; 'strong_password',\n            'active' =&gt; '1'\n        ]\n    ]\n],<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The main values are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>host<\/strong> \u2014 Database server hostname<\/li>\n\n\n\n<li><strong>dbname<\/strong> \u2014 Magento database name<\/li>\n\n\n\n<li><strong>username<\/strong> \u2014 Database user<\/li>\n\n\n\n<li><strong>password<\/strong> \u2014 Database user&#8217;s password<\/li>\n\n\n\n<li><strong>active<\/strong> \u2014 Determines whether the connection is active<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Your exact configuration may contain additional options.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When_Should_You_Change_Magento_Database_Credentials\"><\/span>When Should You Change Magento Database Credentials?<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">You may need to update the credentials when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You change the database password.<\/li>\n\n\n\n<li>You create a new database user.<\/li>\n\n\n\n<li>You migrate Magento to another server.<\/li>\n\n\n\n<li>You rename or replace the database.<\/li>\n\n\n\n<li>You move from cPanel to DirectAdmin.<\/li>\n\n\n\n<li>Your database credentials were exposed.<\/li>\n\n\n\n<li>You move the database to another server.<\/li>\n\n\n\n<li>You change the database hostname.<\/li>\n\n\n\n<li>You are following a security policy requiring credential rotation.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Changing the password periodically can also reduce the risk associated with compromised credentials.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Before_Changing_the_Credentials\"><\/span>Before Changing the Credentials<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before modifying <code>env.php<\/code>, make sure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SSH or File Manager access<\/li>\n\n\n\n<li>Access to the Magento installation<\/li>\n\n\n\n<li>Database administrator access<\/li>\n\n\n\n<li>The new database credentials<\/li>\n\n\n\n<li>A recent Magento backup<\/li>\n\n\n\n<li>Permission to edit <code>app\/etc\/env.php<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Most importantly, <strong>do not change the Magento configuration before confirming that the new database credentials actually work<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Locate_Your_Magento_Installation\"><\/span>Step 1: Locate Your Magento Installation<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Log in to the server through SSH and move to your Magento directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/user\/domains\/example.com\/public_html<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check that Magento is installed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see the installed Magento version.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Back_Up_envphp\"><\/span>Step 2: Back Up <code>env.php<\/code><span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before editing the configuration file, create a backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp app\/etc\/env.php app\/etc\/env.php.backup<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can verify that the backup exists:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -l app\/etc\/env.php*<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Keep this backup until you have confirmed that Magento works with the new credentials.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Check_the_Existing_Database_Credentials\"><\/span>Step 3: Check the Existing Database Credentials<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Open the configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look for:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'db' =&gt; &#91;\n    'connection' =&gt; &#91;\n        'default' =&gt; &#91;\n            'host' =&gt; 'localhost',\n            'dbname' =&gt; 'magento',\n            'username' =&gt; 'magento_user',\n            'password' =&gt; 'old_password',\n            'active' =&gt; '1'\n        ]\n    ]\n],<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Record the existing values before making any changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also search for the database section:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -n \"'db'\" app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Be careful when displaying or sharing this file because it may contain sensitive credentials and encryption keys.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_Create_or_Change_the_Database_User\"><\/span>Step 4: Create or Change the Database User<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If you are only changing the password of an existing database user, you can update that user&#8217;s password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, from MySQL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER USER 'magento_user'@'localhost'\nIDENTIFIED BY 'NewStrongPasswordHere';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the MySQL\/MariaDB version, the exact syntax and authentication configuration may vary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are creating a new database user, you can use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE USER 'new_magento_user'@'localhost'\nIDENTIFIED BY 'NewStrongPasswordHere';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then grant the required permissions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT ALL PRIVILEGES ON magento.* \nTO 'new_magento_user'@'localhost';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Apply the privilege changes if required by your database version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> Replace the database and username values with your actual values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not grant unnecessary privileges to the Magento database user.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_5_Test_the_New_Database_Credentials\"><\/span>Step 5: Test the New Database Credentials<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before changing Magento, test the new credentials directly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u new_magento_user -p magento<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the new password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the credentials are correct, you should receive a MySQL prompt:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SHOW TABLES;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see Magento database tables.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Exit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXIT;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the login fails, fix the database user, password, host, or permissions before changing Magento.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_6_Put_Magento_Into_Maintenance_Mode\"><\/span>Step 6: Put Magento Into Maintenance Mode<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">For a production store, enable maintenance mode before changing the connection configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:enable<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This prevents customers from interacting with the store while the database configuration is being changed.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_7_Update_appetcenvphp\"><\/span>Step 7: Update <code>app\/etc\/env.php<\/code><span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Open the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change the database values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'db' =&gt; &#91;\n    'connection' =&gt; &#91;\n        'default' =&gt; &#91;\n            'host' =&gt; 'localhost',\n            'dbname' =&gt; 'magento',\n            'username' =&gt; 'new_magento_user',\n            'password' =&gt; 'NewStrongPasswordHere',\n            'active' =&gt; '1'\n        ]\n    ]\n],<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save the file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are changing only the password, modify only:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'password' =&gt; 'NewStrongPasswordHere',<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid changing unrelated configuration values.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_8_Check_the_Configuration_Syntax\"><\/span>Step 8: Check the Configuration Syntax<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Because <code>env.php<\/code> is a PHP file, a syntax mistake can prevent Magento from starting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -l app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A successful result should look similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>No syntax errors detected in app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you receive a syntax error, fix it before continuing.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_9_Test_Magentos_Database_Connection\"><\/span>Step 9: Test Magento&#8217;s Database Connection<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If Magento can connect successfully, the command should execute normally.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:flush<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If Magento reports an SQL or database connection error, check the credentials in <code>env.php<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_10_Run_a_Magento_Command\"><\/span>Step 10: Run a Magento Command<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Run another Magento command to confirm that the application can communicate with the database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento indexer:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If this works without a database connection error, the new credentials are likely functioning correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You normally do <strong>not<\/strong> need to run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:upgrade<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">merely because database credentials changed. That command is used for Magento module\/schema changes and should not be run unnecessarily.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_11_Test_the_Storefront\"><\/span>Step 11: Test the Storefront<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Open your Magento website and verify:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Homepage loads<\/li>\n\n\n\n<li>Categories work<\/li>\n\n\n\n<li>Product pages work<\/li>\n\n\n\n<li>Product search works<\/li>\n\n\n\n<li>Images load<\/li>\n\n\n\n<li>Customer login works<\/li>\n\n\n\n<li>Cart works<\/li>\n\n\n\n<li>Checkout works<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Also check whether existing products and orders are visible.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_12_Test_the_Magento_Admin\"><\/span>Step 12: Test the Magento Admin<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Log in to the Magento Admin Panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Dashboard<\/li>\n\n\n\n<li>Products<\/li>\n\n\n\n<li>Categories<\/li>\n\n\n\n<li>Customers<\/li>\n\n\n\n<li>Orders<\/li>\n\n\n\n<li>Configuration<\/li>\n\n\n\n<li>Reports<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If the Admin Panel works and existing data is available, Magento is successfully using the database.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_13_Check_Magento_Logs\"><\/span>Step 13: Check Magento Logs<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If Magento fails after changing the credentials, check the logs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -lah var\/log\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Common files include:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var\/log\/system.log\nvar\/log\/exception.log<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can inspect recent errors with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tail -f var\/log\/system.log<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You may see errors such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQLSTATE&#91;HY000] &#91;1045] Access denied for user<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This usually indicates incorrect credentials or insufficient database permissions.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_14_Disable_Maintenance_Mode\"><\/span>Step 14: Disable Maintenance Mode<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have confirmed that everything works:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:disable<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verify:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The store should now be available to customers.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Changing_Database_Credentials_in_DirectAdmin\"><\/span>Changing Database Credentials in DirectAdmin<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If your Magento website is hosted on DirectAdmin, the process is similar.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First create or modify the database user through:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>DirectAdmin \u2192 Account Manager \u2192 MySQL Management<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on your DirectAdmin configuration, database names and usernames may automatically receive an account prefix.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Account: ehost\nDatabase: ehost_magento\nUser: ehost_magento<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After creating the database user and assigning it to the database, update:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'dbname' =&gt; 'ehost_magento',\n'username' =&gt; 'ehost_magento',\n'password' =&gt; 'NEW_PASSWORD',<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then test the connection from SSH.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Changing_Database_Credentials_on_cPanel\"><\/span>Changing Database Credentials on cPanel<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If Magento is hosted on cPanel, you can manage database users through:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>cPanel \u2192 MySQL Databases<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From there you can:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a database.<\/li>\n\n\n\n<li>Create a database user.<\/li>\n\n\n\n<li>Assign the user to the database.<\/li>\n\n\n\n<li>Grant the required privileges.<\/li>\n\n\n\n<li>Update <code>app\/etc\/env.php<\/code>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The exact database names may include your cPanel account username.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>account_magento\naccount_magento_user<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use the exact names displayed by cPanel.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Change_Only_the_Database_Password\"><\/span>How to Change Only the Database Password<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If you only want to rotate the password, the process is straightforward.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First change the database user&#8217;s password:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER USER 'magento_user'@'localhost'\nIDENTIFIED BY 'NewStrongPassword';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then update:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'password' =&gt; 'OldPassword',<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'password' =&gt; 'NewStrongPassword',<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Test:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then check the storefront and Admin Panel.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Change_the_Database_Name\"><\/span>How to Change the Database Name<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If you move Magento to a different database, update:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'dbname' =&gt; 'new_database',<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'db' =&gt; &#91;\n    'connection' =&gt; &#91;\n        'default' =&gt; &#91;\n            'host' =&gt; 'localhost',\n            'dbname' =&gt; 'new_magento',\n            'username' =&gt; 'new_magento_user',\n            'password' =&gt; 'StrongPassword',\n            'active' =&gt; '1'\n        ]\n    ]\n],<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Before changing this value, make sure the new database already contains the Magento data.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Change_the_Database_Host\"><\/span>How to Change the Database Host<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If the database is hosted on another server, update:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'host' =&gt; 'localhost',<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to the appropriate hostname or IP address:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'host' =&gt; 'db.example.com',<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'host' =&gt; '192.0.2.50',<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The remote database server must allow connections from the Magento server, and the database user must have permission to connect from that host.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not expose a database server to the public Internet unnecessarily. Restrict access through firewall rules and network controls whenever possible.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common_Errors_After_Changing_Magento_Database_Credentials\"><\/span>Common Errors After Changing Magento Database Credentials<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Access_Denied_for_User\"><\/span>Access Denied for User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You may see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQLSTATE&#91;HY000] &#91;1045] Access denied for user<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Username<\/li>\n\n\n\n<li>Password<\/li>\n\n\n\n<li>Database host<\/li>\n\n\n\n<li>User permissions<\/li>\n\n\n\n<li>MySQL\/MariaDB status<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Test manually:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u username -p database_name<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Unknown_Database\"><\/span>Unknown Database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An error such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Unknown database 'magento'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">usually means that the database name in <code>env.php<\/code> does not exist.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SHOW DATABASES;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then verify the value in:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app\/etc\/env.php<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cant_Connect_to_MySQL_Server\"><\/span>Can&#8217;t Connect to MySQL Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An error such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Can't connect to MySQL server<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">can be caused by:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Incorrect database hostname<\/li>\n\n\n\n<li>MySQL\/MariaDB service stopped<\/li>\n\n\n\n<li>Firewall restrictions<\/li>\n\n\n\n<li>Incorrect port<\/li>\n\n\n\n<li>Remote database access not permitted<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Test the database server separately before troubleshooting Magento.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Magento_Shows_a_500_Error\"><\/span>Magento Shows a 500 Error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A 500 error after editing <code>env.php<\/code> may be caused by:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Invalid PHP syntax<\/li>\n\n\n\n<li>Incorrect permissions<\/li>\n\n\n\n<li>Invalid database credentials<\/li>\n\n\n\n<li>PHP configuration problems<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">First check the syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -l app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then inspect Magento and web-server logs.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Security_Best_Practices\"><\/span>Security Best Practices<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Database credentials should be treated as sensitive information.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Use_a_Strong_Password\"><\/span>Use a Strong Password<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use a long, unique password containing a combination of letters, numbers, and symbols.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Use_a_Dedicated_Database_User\"><\/span>Use a Dedicated Database User<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Do not use a shared database account for multiple unrelated applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Grant_Only_Required_Permissions\"><\/span>Grant Only Required Permissions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Magento database user should have the permissions it needs for the Magento database, rather than unnecessary access to unrelated databases.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Protect_envphp\"><\/span>Protect <code>env.php<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The file contains sensitive configuration information. Make sure it is not publicly downloadable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Avoid_Sharing_Credentials\"><\/span>Avoid Sharing Credentials<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Never post <code>env.php<\/code>, database passwords, or complete database connection strings in public forums or support tickets.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Rotate_Exposed_Credentials\"><\/span>Rotate Exposed Credentials<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If database credentials are accidentally exposed, change the database password immediately and update Magento&#8217;s configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Keep_Backups_Secure\"><\/span>Keep Backups Secure<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Database backups can contain customer and order information. Store them securely and restrict access.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Quick_Command_Reference\"><\/span>Quick Command Reference<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Check Magento version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Enable maintenance mode:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:enable<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check maintenance status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Test PHP syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -l app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check Magento cache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Flush Magento cache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:flush<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check indexers:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento indexer:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Disable maintenance mode:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:disable<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Magento_Database_Credential_Change_Checklist\"><\/span>Magento Database Credential Change Checklist<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before finishing the change, verify:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Magento backup created<\/li>\n\n\n\n<li><code>app\/etc\/env.php<\/code> backed up<\/li>\n\n\n\n<li>New database user created or existing user updated<\/li>\n\n\n\n<li>New password tested<\/li>\n\n\n\n<li>Database permissions verified<\/li>\n\n\n\n<li><code>env.php<\/code> updated<\/li>\n\n\n\n<li>PHP syntax checked<\/li>\n\n\n\n<li>Magento CLI command tested<\/li>\n\n\n\n<li>Cache checked\/flushed<\/li>\n\n\n\n<li>Storefront tested<\/li>\n\n\n\n<li>Admin Panel tested<\/li>\n\n\n\n<li>Checkout tested<\/li>\n\n\n\n<li>Orders verified<\/li>\n\n\n\n<li>Magento logs checked<\/li>\n\n\n\n<li>Maintenance mode disabled<\/li>\n\n\n\n<li>Old credentials no longer exposed<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Changing Magento database credentials is usually a simple configuration task, but an incorrect database username, password, hostname, or permission can make the entire store unavailable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The safest approach is to <strong>back up <code>app\/etc\/env.php<\/code>, create and test the new database credentials, update the configuration, verify the PHP syntax, test Magento CLI commands, and then check the storefront and Admin Panel<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are migrating Magento between servers, changing the database credentials should be performed as part of the larger migration process rather than as an isolated change. Always keep a working backup of the previous configuration until the new database connection has been fully verified.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"How to Change Magento Database Credentials Magento stores important information such as products, customers, orders, configurations, and CMS&hellip;","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_display_header_overlay":false,"csco_singular_sidebar":"","csco_page_header_type":"","footnotes":""},"categories":[138],"tags":[],"class_list":["post-2793","post","type-post","status-publish","format-standard","category-magento","cs-entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Change Magento Database Credentials - Web Hosting Blogs by Ehostpiya | Tips and Tricks<\/title>\n<meta name=\"description\" content=\"How to Change Magento Database Credentials - Magento\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change Magento Database Credentials - Web Hosting Blogs by Ehostpiya | Tips and Tricks\" \/>\n<meta property=\"og:description\" content=\"How to Change Magento Database Credentials - Magento\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/ehostpiya\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-06T12:31:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-06T12:31:23+00:00\" \/>\n<meta name=\"author\" content=\"Vandeeta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vandeeta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/\"},\"author\":{\"name\":\"Vandeeta\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/person\\\/7e99667266ef1b118ad734c1c035d796\"},\"headline\":\"How to Change Magento Database Credentials\",\"datePublished\":\"2026-10-06T12:31:20+00:00\",\"dateModified\":\"2026-10-06T12:31:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/\"},\"wordCount\":1564,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\"},\"articleSection\":[\"Magento\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/\",\"name\":\"How to Change Magento Database Credentials - Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-06T12:31:20+00:00\",\"dateModified\":\"2026-10-06T12:31:23+00:00\",\"description\":\"How to Change Magento Database Credentials - Magento\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-change-magento-database-credentials\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change Magento Database Credentials\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\",\"name\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\",\"name\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/512.png\",\"contentUrl\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/512.png\",\"width\":512,\"height\":512,\"caption\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\"},\"image\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/ehostpiya\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/person\\\/7e99667266ef1b118ad734c1c035d796\",\"name\":\"Vandeeta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"caption\":\"Vandeeta\"},\"sameAs\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\"],\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/author\\\/ehostpiya_blog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change Magento Database Credentials - Web Hosting Blogs by Ehostpiya | Tips and Tricks","description":"How to Change Magento Database Credentials - Magento","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:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/","og_locale":"en_US","og_type":"article","og_title":"How to Change Magento Database Credentials - Web Hosting Blogs by Ehostpiya | Tips and Tricks","og_description":"How to Change Magento Database Credentials - Magento","og_url":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/","og_site_name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","article_publisher":"https:\/\/facebook.com\/ehostpiya","article_published_time":"2026-10-06T12:31:20+00:00","article_modified_time":"2026-10-06T12:31:23+00:00","author":"Vandeeta","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vandeeta","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#article","isPartOf":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/"},"author":{"name":"Vandeeta","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/person\/7e99667266ef1b118ad734c1c035d796"},"headline":"How to Change Magento Database Credentials","datePublished":"2026-10-06T12:31:20+00:00","dateModified":"2026-10-06T12:31:23+00:00","mainEntityOfPage":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/"},"wordCount":1564,"commentCount":0,"publisher":{"@id":"https:\/\/ehostpiya.in\/blog\/#organization"},"articleSection":["Magento"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/","url":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/","name":"How to Change Magento Database Credentials - Web Hosting Blogs by Ehostpiya | Tips and Tricks","isPartOf":{"@id":"https:\/\/ehostpiya.in\/blog\/#website"},"datePublished":"2026-10-06T12:31:20+00:00","dateModified":"2026-10-06T12:31:23+00:00","description":"How to Change Magento Database Credentials - Magento","breadcrumb":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ehostpiya.in\/blog\/how-to-change-magento-database-credentials\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ehostpiya.in\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Change Magento Database Credentials"}]},{"@type":"WebSite","@id":"https:\/\/ehostpiya.in\/blog\/#website","url":"https:\/\/ehostpiya.in\/blog\/","name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","description":"","publisher":{"@id":"https:\/\/ehostpiya.in\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ehostpiya.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ehostpiya.in\/blog\/#organization","name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","url":"https:\/\/ehostpiya.in\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ehostpiya.in\/blog\/wp-content\/uploads\/2026\/08\/512.png","contentUrl":"https:\/\/ehostpiya.in\/blog\/wp-content\/uploads\/2026\/08\/512.png","width":512,"height":512,"caption":"Web Hosting Blogs by Ehostpiya | Tips and Tricks"},"image":{"@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/ehostpiya"]},{"@type":"Person","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/person\/7e99667266ef1b118ad734c1c035d796","name":"Vandeeta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","caption":"Vandeeta"},"sameAs":["https:\/\/ehostpiya.in\/blog"],"url":"https:\/\/ehostpiya.in\/blog\/author\/ehostpiya_blog\/"}]}},"_links":{"self":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/comments?post=2793"}],"version-history":[{"count":1,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2793\/revisions"}],"predecessor-version":[{"id":2794,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2793\/revisions\/2794"}],"wp:attachment":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/media?parent=2793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/categories?post=2793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/tags?post=2793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}