How to Change Joomla Database Credentials

Understand which credentials Joomla uses

Joomla connects to its database using settings in configuration.php, including the database host, username, password, database name, and table prefix. Changing a database account requires the server-side database account and Joomla's configuration to remain synchronized.

Take a current backup first

Back up the database and configuration.php before changing credentials. If you are changing credentials during a migration or hosting move, take a complete site backup. Keep the existing working credentials available until the new connection has been proven.

Create or update the database account at the server

Use the hosting control panel or database administration system to create the new database user or change the existing user's password. Assign the user to the Joomla database with the privileges Joomla needs. Joomla documentation for database creation describes creating a database user and assigning that user privileges to the database.

Update Joomla's configuration.php

Edit the database username and password settings in configuration.php so they match the server-side account. If the database server or database name also changed, update those values only when the migration requires it. Do not change the table prefix unless the database tables themselves use the corresponding prefix.

Protect the new password

Use a strong database password and do not expose configuration.php in tickets, screenshots, repositories, or public directories. Transfer edited configuration files through a secure method and restore appropriate file permissions after the change.

Test the connection immediately

Load the Joomla frontend and Administrator. A wrong host, username, password, database name, or missing database privilege can cause a database connection error. Check Joomla, PHP, and hosting logs if the site does not connect.

Verify both reads and writes

After the site loads, test a noncritical Joomla save operation so you know the new database account can write as well as read. Confirm scheduled jobs and extension functions that use Joomla's normal database connection continue to work, then retire old credentials according to your hosting security policy.


Need More Help with Joomla?

Still having trouble? Open a support ticket with QuantaCade Support and we'll be happy to help where we can.

Support priority is given to QuantaCade products, services, and customers. However, we're also happy to assist fellow Joomla users with general Joomla questions and troubleshooting when possible.

QuantaCade is an independent Joomla extension developer and is not official Joomla support. Some issues involving third-party extensions, hosting environments, server configurations, or other systems outside our development control may be beyond what we're able to resolve.

Open a Support Ticket