What this procedure is
How to change the database username/password and update PrestaShop configuration so it can connect again.
Applies to: PrestaShop 8.x.
Why you would do this
- Security password rotation.
- Hosting changed your credentials.
- Recover database connectivity.
Prerequisites
- Hosting panel access (MySQL).
- Access to store files (FTP).
Quick diagnosis (before you change anything)
1) Confirm which config file your store uses
Expected result: know whether it is app/config/parameters.php.
Change database credentials
Step 1) Change the password in hosting
In the hosting panel, change the MySQL user password or create a new user with privileges.
Step 2) Update the configuration file
Edit app/config/parameters.php and update username/password/host if needed.
Step 3) Test the store
Open the storefront and Back Office.
Final verification
- No more database connection error.
- Back Office works.
If something doesn’t work (common issues)
Still cannot connect
- Check DB user privileges.
- Confirm host/port.
- Check the exact error via logs/debug.
Best practices
- Store credentials in a secure manager.
- Avoid reused passwords.