WordPress GuideDatabase → Find Name

How to find your database name in WordPress

Image

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:

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

Option 2: Use an FTP client like FileZilla

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.

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.

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:

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:

Still unsure? Your hosting provider’s support team can usually confirm the correct database name for your site.

Ready to get started?

Get the fastest, most secure WordPress.org hosting on the market.