How to Find Your WordPress Database Name

Table of Contents
Reading Time: 1 min, 28 sec
If you manage a WordPress site, there will be a time when you need to know your database name. This usually happens while fixing errors, moving a site, creating backups, or connecting tools like phpMyAdmin. If you just have one website, that would be easy. But this becomes confusing if there are multiple WordPress websites on the hosting and you can’t figure out which database belongs to the specific website.
Thankfully, WordPress always stores the database name in a fixed place. You just need to know where to look. WordPress database holds all important data, including posts, pages, users, comments, and settings. You need to know this for moving your website from one host to another, for taking a backup, or for maintenance tasks such as running queries or debugging issues.
Best WordPress Hosting
Bluehost is one of the best and secure WordPress hosting providerThe easiest and most reliable method. WordPress stores database details inside the wp-config.php file.

You can access this file using FTP, a file manager in your hosting control panel, or SSH. Open the file and look for this line.
define('DB_NAME', 'your_database_name_here');
The value inside the quotes is your WordPress database name.
This method works for all WordPress sites, regardless of hosting provider.
Do not change the database name unless you know what you are doing. If the name does not match the value in wp-config.php, WordPress will show a database connection error.
Always take a backup before making any changes.
Wrap Up
Finding your WordPress database name is a basic skill every site owner should know. It saves time during troubleshooting and makes site management easier. Once you know where to look, it takes less than a minute to find it.