Editing Magento Database Configuration File

Editing Magento Database Configuration File

From the root of your Magento installation enter the app/etc/ folder and edit env.php file which contains all the information related to your database configuration in the 'db' node.

Magento app/etc folder
Magento app/etc folder

From here, you can edit various values related to your database configuration such as:

  • host: your host address (usually localhost)
  • dbname: the name of the Magento website database
  • username & password: account information that has access to dbname
env.php file Magento
env.php file Magento

After you’re done configuring, remember to save the file and clear your cache from Magento System > Tools > Cache Management > Flush Magento Cache

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.