Loading...

Knowledge Base

How to Find Your WordPress Database

Struggling to find your WordPress database? Every WordPress site stores its core data, including posts, pages, user credentials and configuration settings, in a MySQL database. Locating this WordPress database location is essential for troubleshooting errors, managing database tables and connecting through tools like phpMyAdmin.

This article explains how to locate your document root, identify your database name, and access it through your phpMyAdmin.

What is a WordPress Database?

A WordPress database plays an important role in managing and organizing the data behind your website. It is primarily built on MySQL, which is a relational database management system. It stores the posts, pages, comments, and user information of your WordPress website.

How to Find the WordPress Database

Here are the simple steps to help you find your WordPress database:

Step 1: Identify the Document Root

  1. Log in to your Bluehost Account Manager.
  2. In the left-hand menu, click Websites.

    Bluehost Account Manager - Websites Tab
     

  3. Click the MANAGE button located next to the website you want to manage.

    Bluehost Account Manager - Website Manage button
     

  1. Click the FILES & ACCESS menu.

    Account Manager - Websites tab - Files & Access menu
     

  2. Look for the Document Root card. The file path shown in this card indicates the folder or directory where your website files and core files are stored.

    Files & Access tab - Document root

    Please take note of your document root. For instance, in the image above, the "public_html" folder is shown as the document root.

Step 2: Locate the wp-config.php File

  1. Under the FILES & ACCESS tab, click MANAGE in the File Manager card.

    Files & Access tab - File Manager
     

  2. Your File Manager will open in a new tab. Navigate to your document root and look for the wp-config.php file.

    File Manager - cPanel - wp-config.php file
     

  3. Select the wp-config.php file, right-click, and select View.
  4. The file will open in a new tab. Look for the following lines of code:

    define('DB_NAME', 'example_database');
    define('DB_USER', 'example_user');
    define('DB_PASSWORD', 'example_password');
    define('DB_HOST', 'localhost')

    Here is the definition of each line of code:

    • DB_NAME: The name of your WordPress database.
    • DB_USER: The MySQL user with access.
    • DB_PASSWORD: The login password for the database.
    • DB_HOST: The server hosting the database.
       
  5. The string of numbers and letters following the line "define('DB_NAME'," is the name of your WordPress database. Take note of this string of characters. For the example above, that would be "example_database."

Step 3: Access your Database in phpMyAdmin (Optional)

If you have several databases, you can easily locate your database in phpMyAdmin.

  1. Under the Overview tab, click the PHPMyAdmin button.

    Websites tab - Overview tab - PHPMyAdmin button
     

  2. The phpMyAdmin section will open in a new tab. Using the database name you noted in Step 2, search for your database in the left pane.

    PHPMyAdmin - Search for your database
     

You can now use the management features available in phpMyAdmin to manage your database. For more information about phpMyAdmin, visit our How to Manage a Database Using phpMyAdmin article.

Summary

The WordPress database is the location where all of your website's content, users, and settings are stored. Understanding the WordPress database location helps site owners troubleshoot login issues, manage stored data and maintain a secure web host setup. To manage your website effectively, you must learn how to find your WordPress database. This article walks you through identifying your document root, locating the wp-config.php file, and accessing your database directly via phpMyAdmin.

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.

Did you find this article helpful?

 
* Your feedback is too short

Loading...