◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Database → Find Name
How to find your database name in WordPress
Every WordPress site stores its content—like posts, pages, users, and settings—in a MySQL or MariaDB database. That database is the heart of your site. But what happens when you need to access it directly?
Whether you’re troubleshooting, migrating your site, or using a backup plugin, you’ll need to know the exact name of your WordPress database. Here’s how to find it, step by step.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
What is the WordPress database and why the name matters
When someone visits your website, WordPress pulls information from the database and displays it in real time. That includes your content, your theme settings, even your site’s name and URL.
Each site has a unique database, and WordPress needs to know exactly which one to connect to. That connection is defined in your wp-config.php file. If the database name is incorrect or the file is missing, your site won’t load properly.
You’ll need your database name when:
- Accessing the database in phpMyAdmin
- Connecting a migration or backup plugin
- Troubleshooting “Error establishing a database connection”
- Editing tables directly (advanced users only)
The easiest way: check wp-config.php
The wp-config.php file contains the database name, database user, password, and other key settings. It’s located in the root folder of your WordPress site.
Option 1: Use your hosting control panel’s file manager
- Log in to your hosting account.
- Open File Manager—in cPanel, it’s usually under the Files section.
- Navigate to the folder where WordPress is installed. For most sites, that’s public_html. If you’re using an add-on domain or subdomain, it might be in a subfolder.
- Locate the file named wp-config.php. Right-click it and choose View or Edit.
- Find the line that looks like this:
define( ‘DB_NAME’, ‘your_database_name’ ); - The text inside the quotes (‘your_database_name’) is your database name. Write it down or copy it somewhere safe.
Option 2: Use an FTP client like FileZilla
- Open FileZilla or your preferred FTP client.
- Connect to your website using your FTP credentials (usually provided in your hosting account).
- Navigate to the root WordPress folder—often called public_html, www, or your domain name.
- Download the wp-config.php file to your local computer.
- Open the file with a text editor like Notepad or VS Code.
- Look for the DB_NAME line to find your database name.
Alternate method: identify the database in phpMyAdmin
Once you’ve located your database name in wp-config.php, you can use it to access the actual database in phpMyAdmin. This is useful if you want to export your data or check what’s inside.
- Log in to your hosting control panel.
- Find and open phpMyAdmin—usually under the Databases section in cPanel.
- In the left sidebar, look for a list of databases.
- Click on the database name that matches what you found in wp-config.php.
- You’ll see a list of tables like wp_posts, wp_users, wp_options, and more. These are the building blocks of your WordPress site.
If you’re not sure which database belongs to which site (especially if you have more than one WordPress install), matching the name from wp-config.php ensures you open the correct one.
Finding your database with managed hosting for WordPress
If you’re using managed hosting for WordPress, you may not have access to cPanel—but you’ll still be able to find your database information.
- Look in your hosting dashboard for a phpMyAdmin or Database Access section.
- Managed hosts often provide a link or credentials for accessing the database directly.
- If it’s not visible, check your host’s help documentation or contact support.
Managed hosts may also store WordPress files in unique folder structures, so wp-config.php might be under a different path like /sites/yourdomain/.
What to do once you have your database name
Once you’ve found your database name, you can:
- Open it in phpMyAdmin to make edits or backups.
- Use it to verify your site’s database when migrating to a new host.
- Check that your database name matches any credentials or settings you’re using in plugins or staging tools.
Just remember—editing your database directly is powerful, but risky. Always make a full backup before making changes.
Troubleshooting tips
If something doesn’t look right, here are a few common issues:
- Can’t find wp-config.php? Make sure you’re in the correct folder. For some sites, especially on multisite or staging setups, WordPress may be installed in a subdirectory.
- Missing or blank database name? That’s a sign something is broken—possibly a failed migration or a corrupt config file.
- Seeing “Error establishing a database connection”? The database name might be incorrect, or the database itself could be down. Check both the database name and user credentials in wp-config.php.
Still unsure? Your hosting provider’s support team can usually confirm the correct database name for your site.
Next steps for finding your WordPress database name
Knowing your database name is a key part of managing and maintaining a healthy WordPress site. It gives you access to everything happening under the hood and helps you solve problems faster when they pop up.
If you’re planning to back up, migrate, or troubleshoot your site, your next step is to log in to phpMyAdmin and explore your database safely—just make sure to take a backup first.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy. Liquid Web’s WordPress hosting options configure business-class servers and support plans specifically for WordPress websites.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our WordPress hosting options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
What is WordPress? →
A complete beginner’s guide to WordPress.org
WordPress transients: A beginner’s guide →
Understand WordPress transients and how they help temporarily store cached data to boost website performance.
WordPress development →
A beginner’s guide to WordPress dev, including hosting, admin basics, AI, and more