The authoritative database name for a WordPress installation is the value assigned to DB_NAME in that site’s wp-config.php file. Open the configuration file in the installation root and find a line like define( 'DB_NAME', 'example_database' );; the quoted value is the name WordPress is configured to use. If you can log in as an administrator, you can also read it at Tools → Site Health → Info → Database.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
What the WordPress database name means
WordPress stores posts, pages, settings, users and other site data in a MySQL-compatible database. The database name is the identifier WordPress uses when it connects to that database. In the configuration file, it appears as the DB_NAME constant. The WordPress configuration template describes this value as “The name of the database for WordPress.” The setup screen describes it as “The name of the database you want to use with WordPress.”
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
WordPress Multisite Administration | $34.38 | Buy on Amazon |
| 2 |
|
Mon Site WordPress – Volume 2 – Administration & Utilisation (French Edition) | $9.90 | Buy on Amazon |
| 3 |
|
WordPress 24-Hour Trainer | $3.95 | Buy on Amazon |
| 4 |
|
Teacher Record Book | $4.89 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →A database name is different from the database host, username and password. The host tells WordPress which database server to contact; DB_USER and DB_PASSWORD provide credentials; DB_NAME selects the database on that server. You normally need only the name when a host asks which database belongs to a site, when preparing a backup, or when diagnosing a connection error.
Fastest method: read DB_NAME in wp-config.php
Checking the configuration file is the most direct method because it shows the value WordPress itself is configured to use. You need access to the files for the specific installation, through your host’s File Manager, SFTP or SSH.
#1 Best Overall
Using a hosting File Manager
- Sign in to the hosting account that contains the site.
- Open the host’s File Manager and browse to the WordPress installation root—the directory containing the site’s WordPress files.
- Locate
wp-config.php. If the File Manager hides configuration files, enable its option to show hidden files. - Open the file in the editor, or download a copy for viewing. Do not change the file merely to find the name.
- Search for
DB_NAME. The relevant line normally has this form:
define( 'DB_NAME', 'example_database' );
The text between the second pair of quotes—example_database in this example—is the database name. Copy it exactly, including underscores, hyphens or any host-assigned prefix. Do not copy the quotation marks or the surrounding PHP syntax.
Using SFTP
- Connect to the same hosting account with an SFTP client.
- Open the directory for the site you are troubleshooting.
- Download
wp-config.phpor use the client’s safe view/edit function. - Find
define( 'DB_NAME', '...' );and record the quoted value.
Make sure the SFTP directory belongs to the domain or installation in question. A single hosting account can contain several WordPress directories, each with its own configuration file.
Using SSH
If the host provides shell access, change to the site’s installation directory and print or search the file without editing it. For example:
grep DB_NAME wp-config.php
The output should contain the same define statement. If the command returns nothing, confirm that you are in the directory containing the correct wp-config.php; do not assume that the current directory is the site root.
Find the name in WordPress Site Health
When you can sign in to WordPress administration, Site Health avoids file-manager access. Learn WordPress recommends this route when one hosting account contains multiple databases.
- Sign in to the WordPress dashboard with an account that can view Site Health information.
- Open Tools → Site Health.
- Select the Info tab.
- Expand the Database section.
- Read the field labeled Database name.
This value is the database name WordPress reports for the running site. It is especially useful when several databases appear in a hosting dashboard and you want to associate the logged-in site with one of them. Treat the displayed value as sensitive operational information and share only the name when that is all another person needs.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Confirm a candidate database in phpMyAdmin
phpMyAdmin is useful when you have access to the host’s control panel but are unsure which listed database belongs to the site. It is a confirmation method: the definitive configured value remains DB_NAME in the site’s own wp-config.php.
Open the database list
- Sign in to the hosting control panel, such as cPanel or the host’s equivalent dashboard.
- Open phpMyAdmin.
- Review the database names shown in the left navigation.
Hosting providers often add an account or user prefix to database names. Do not infer a match from a domain name, directory name or a familiar-looking suffix alone.
Use WordPress tables as a check
If more than one database looks plausible, select a candidate and inspect its table list. Standard WordPress tables include tables such as wp_options and wp_posts. Finding those tables is evidence that the database contains WordPress data; it does not replace checking the matching site’s configuration file when you need certainty.
- Likely WordPress data: the candidate contains recognizable WordPress tables, including examples such as
wp_optionsandwp_posts. - Not enough evidence: a database name merely resembles the domain or project name.
- Wrong candidate: the database has no WordPress tables or clearly belongs to another application.
Use read-only inspection. Do not rename, delete, empty or alter tables while you are only trying to identify the database.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteUse WP-CLI when you have shell access
WP-CLI provides a command-line fallback for administrators and developers who can access the server but do not want to open a browser-based control panel. Run commands from the WordPress installation directory so WP-CLI loads the intended site’s configuration.
Display the database name and size
wp db size
This command displays the database name and its size. The name shown is the database associated with the WordPress installation detected in the current directory.
Rank #3
Open the database console
wp db cli
wp db cli opens a MySQL console using the connection details from wp-config.php. It is useful when you need to inspect the connection directly, but simply finding the name does not require changing any data. Exit the console without running write operations if identification is your only goal.
When WP-CLI reports the wrong site
WP-CLI reads the configuration associated with the directory in which it runs. If the output surprises you, check the current path and locate that directory’s wp-config.php. On a server with several installations, run the command separately from each site’s own directory.
Choose the method that matches your access
| Method | Access required | What it tells you | Confidence | Risk while reading |
|---|---|---|---|---|
wp-config.php |
File Manager, SFTP or SSH | The configured DB_NAME value for that installation |
Direct and authoritative | Low if you only view the file |
| WordPress Site Health | WordPress administrator login | The running site’s reported database name | Direct for the logged-in site | Low; no file editing |
| phpMyAdmin | Hosting dashboard access | Candidate databases and their tables | Confirmatory; verify against wp-config.php |
Low for viewing, higher if you edit tables |
wp db size |
SSH and WP-CLI | Database name and size for the current installation | Direct when run in the correct directory | Low when used for display only |
Start with wp-config.php when you have file access. Use Site Health when you can log in but do not have hosting access. Use phpMyAdmin to distinguish among candidates, and WP-CLI when command-line access is your most convenient route.
How to identify the correct database on a busy server
The same server can host multiple WordPress installations. WordPress documentation defines DB_NAME as the name of the individual database created for that blog on the MySQL server specified by DB_HOST. Therefore, the answer belongs to the specific site you are troubleshooting, not to the server as a whole.
Match the site directory first
Begin with the domain, staging site or directory you actually need to repair. Open that installation’s wp-config.php, then record its DB_NAME. If you instead open a neighboring site’s file, every later comparison can point to the wrong database.
Compare the configured name with phpMyAdmin
Search the phpMyAdmin list for the exact configured value. If it is present, select it and look for WordPress tables such as wp_options and wp_posts. This two-part check—exact name plus recognizable tables—reduces the chance of choosing a similarly named database.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsRank #4
- Keep track of everything from attendance to test scores
- Spiral bound
- Measures 8-1/2" x 11"
Do not infer from a domain or directory
A domain, folder or database label can be descriptive, abbreviated or host-prefixed. None of those names is authoritative by itself. Use the site’s own DB_NAME setting or the corresponding Site Health value.
What to do when the names do not match
The value in wp-config.php is absent from phpMyAdmin
- Confirm that you opened the correct WordPress installation directory.
- Confirm that the hosting account is the same account associated with the
DB_HOSTvalue in that file. - Check for a typo when copying the database name; preserve every character.
- Ask the web host whether the database is on a different account or server.
Do not replace DB_NAME with a guess simply because another database looks similar. Changing connection settings can take the site offline or connect it to the wrong data.
The database exists but does not look like WordPress
Open the candidate’s table list and look for recognizable WordPress tables, including examples such as wp_options and wp_posts. If they are missing, you may be viewing a database for another application or the wrong installation. Return to the matching wp-config.php and repeat the comparison.
You cannot obtain the connection details
WordPress’s setup screen advises contacting the web host when you cannot obtain the database connection details. The host can identify the account, server and database associated with the installation after verifying that you are authorized to receive the information.
Protect wp-config.php while finding the name
The file contains more than DB_NAME. It also contains DB_USER and DB_PASSWORD, which are connection credentials. Handle it as sensitive configuration data.
- Share only the database name when that is all a colleague or support agent needs.
- Do not paste the complete file into a public forum, ticket or chat.
- When sending a screenshot, crop or redact usernames, passwords and other settings.
- Prefer viewing or downloading the file over editing it for an identification task.
- Keep any local copy secure and delete it when it is no longer needed.
Reading a name is normally a low-risk, read-only operation. Editing credentials, changing the host or renaming a database is a separate maintenance task that requires a backup and a verified recovery plan.
Can you find the database name without cPanel?
Yes. cPanel is only one possible route. You can use any of the following instead:
- WordPress admin: Tools → Site Health → Info → Database.
- SFTP or another host file manager: read
DB_NAMEin the installation’swp-config.php. - SSH: search the file with
grep DB_NAME wp-config.php, or runwp db sizefrom the correct site directory. - Another hosting panel: open its phpMyAdmin equivalent and compare candidate databases with the configured name.
If you have none of these forms of access, the web host is the party that can provide or confirm the connection details.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Quick decision checklist
- Need the most authoritative answer? Open the target site’s
wp-config.phpand readDB_NAME. - Can log in to WordPress but not the host? Use Tools → Site Health → Info → Database.
- Have several database candidates? Compare their exact names with
DB_NAME, then check for WordPress tables such aswp_optionsandwp_posts. - Have SSH? Run
wp db sizein the site directory, or usegrep DB_NAME wp-config.php. - Nothing matches? Recheck the installation directory and hosting account tied to
DB_HOST; contact the host if the details remain unavailable. - Sharing the result? Send only the database name, never the full configuration file or password.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

