Home / Prestashop / How to Change Database Credentials

How to Change Database Credentials

Learn how to change database credentials on PrestaShop 8.x with clear steps, prerequisites, verification, and common troubleshooting.

Views: 25 Unique: 21 Updated: 2026-03-22

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.
Back to category