How to Find Your Joomla Database Name

Joomla stores the database name it is configured to use in configuration.php in the site's root directory. Reading that value is safer than guessing from a hosting-panel list, especially when the account contains production, staging, old backups, or several databases with similar names.

Locate the correct configuration.php

  1. Identify the document root for the Joomla site you are troubleshooting.
  2. Open that directory with your hosting file manager, SFTP, SSH, or another secure file-access method.
  3. Find configuration.php in the Joomla root—the same installation that contains directories such as administrator, components, and libraries.
  4. Open the file for viewing; do not save changes merely to inspect it.

If the hosting account contains a staging subdomain or archived site, verify the path/hostname before trusting any value you find.

Read the database-name setting

Inside Joomla's configuration.php, find the database property named $db. It will look broadly like this:

public $db = 'example_database';

The text between the quotes is the database name Joomla is configured to open. Use the exact value, including any hosting-account prefix. Do not confuse $db with $user (database username), $host (database server), or $dbprefix (table prefix).

Protect the credentials around the value

configuration.php also contains the database password and other site-specific settings. Never paste the complete file into a public forum, issue tracker, screenshot, or support conversation. If someone needs the database name, copy only that non-password value and redact surrounding credentials.

If you accidentally expose the database password, treat it as compromised and rotate it through the hosting/database platform, then update Joomla's configuration consistently.

Cross-check the database in your hosting tool

Open phpMyAdmin or the host's database manager and locate the exact database name from $db. Select it and check for Joomla tables using the configured table prefix. This read-only cross-check helps prevent SQL work against the wrong site.

Some hosts prepend the account name automatically, so the complete database identifier can be longer than the short name shown when it was created. Prefer Joomla's exact configured value when matching it to the hosting interface.

Verify before making database changes

Before running any UPDATE, DELETE, ALTER, import, repair, or migration, verify both the database name and Joomla table prefix and take a current database backup. If the expected tables are absent, stop: you may have selected the wrong database or the site may be configured differently than assumed.

For maintenance documentation, record which site the database belongs to, but store passwords separately in an appropriate credential manager rather than copying configuration.php into ordinary notes.


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