1. Home
  2. CMS
  3. WordPress
  4. Finding Your Database Name in WordPress

Finding Your Database Name in WordPress

Finding Your Database Name in WordPress
Finding Your Database Name in WordPress

The WordPress Administration section allows you to handle many settings and features. However, during a troubleshoot, or under extreme circumstances, you might have to work directly with the database.
Many hosting accounts have more than one database therefore you will need to know which database to work with.
In this tutorial we will teach you how to locate the database name your particular WordPress installation is working with.

How to locate your WordPress installation’s database name

Step 1: Log into your cPanel account.

Step 2: Then open and enter the ‘File Manager’ tool.

Step 3: Navigate and move to the root folder for your WordPress installation.
In your main domain, the root folder is going to be ‘public_html’. I
Using a domain name, the root folder is going to be under ‘public_html/domainname’ (For example, if example.com is the addon domain, you are going to have to find the ‘public_html/example.com‘ folder).
Step 4: In the root folder for your application you will see plenty of files. Look for the ‘wp-config.php’ file.
Highlight this file and click on the ‘Edit’ button found in the toolbar at the top of the screen. A popup should show up on the screen, click on ‘edit’ here too.
Step 5: You should now see a lot of code regarding WordPress.
After the code comments, around line 19, you should see the code for the database name. It will appear like the example below.

define('DB_NAME', 'userna5_wp123');

The database name parameter is composed of two parts. In this example, ‘userna5’ and ‘wp123’, the first part is going to be your cPanel username (userna5) and the second part will be the database name (wp123)
Record your database name in a secured location in order to remember it whenever you need to access the phpMyAdmin tool.

Updated on December 23, 2018

Was this article helpful?

Related Articles

Leave a Comment

[apsl-login-lite login_text='Please login with a social account']