Which Database Is My WordPress Website Using?

If you have several WordPress websites with your hosting provider, the control panel doesn’t make it obvious which database belongs to which website.

The problem is that the WordPress database names may not be similar to the domain names.

For example, I use HostArmada as my hosting provider and I have five websites on my plan. These are the database names:

  • [plan name]_wp77
  • [plan name]_wp558
  • [plan name]_wp740

I want to know which of these databases belong to a specific website, but the names here don’t help me.

How To Find The Database Name For Your Website

These steps take you through the process of finding the database name using the server. This method is the simplest when you are checking a specific website.

  1. Log in to the control panel in the website of your hosting provider
  2. Open the file manager tool
  3. Expand the main folder for the website you are checking
  4. Open or view the “wp-config.php” file in this folder
  5. Find the comment near the top saying “the name of the database for WordPress”
  6. The next line defines the DB_NAME property i.e. the name of the database.

How To Find The Website Associated With A WordPress Database

You can also find the website name associated with a specific database. 

Let’s say you’ve connected via phpMyAdmin to a database named [plan_name]_wp482.

Using the Browse feature

  1. Expand the list of tables in the left pane.
  2. Click on table wp_options
  3. Check the “siteurl” row in the right pane

The “siteurl” row shows the full url for the associated website supported by this WordPress database.

You will also see rows with data for the blog name and description.

Here is the options table highlighted in my system:

Using SQL to check the website name

Alternatively, you can run SQL to find the full URL of the website.

Run this statement in the control panel “query” tab:

SELECT * FROM `wpvv_options` WHERE option_name = “siteurl”

Can You Check The Database Name From The WordPress Admin Dashboard?

Unfortunately, you can’t find the database name via your WordPress admin dashboard.

Instead, you need to access a file on the server.

You have two options, one of which I described in the previous section.

The second option is to use an ftp connection to view or modify files on the server. This is a little more technical to set up so I won’t describe it here.

Does The WordPress System Name Give A Clue To the Database Name?

In my earlier example, the database system names were differentiated by a number.

You may be wondering if you can guess the website from these system names. I thought I might be able to tell from the order of numbers in the system names.

But in my case, the lowest number was assigned to the fourth website of five that I’d set up on the hosting plan.

So, my conclusion is that you can’t make any leap from those cryptic numbers to a specific website.