WordPress Tutorial

How to Find Out WordPress Database Name

Introduction

Most of the web-based scripts have their own configuration file, where webmasters specify their host database information and how script(s) must behave in certain situations. In this tutorial, we will learn to identify your WordPress database name using wp-config.php file.

[optin-monster-shortcode id="cgx87nzwxn0himxw62bn"]

What you’ll need

Before you begin this guide you’ll need the following:

  • Active hosting account
  • WordPress installed on your hosting account
  • cPanel’s File Manager access or FTP access with FTP client such as Filezilla

Step 1 — Locating wp-config.php file

In order to locate wp-config.php file, you will first need to access your directory. For this, you can use either File Manager or external FTP Client.

For File Manager

In File Manager, you should be able to see a number of various directories and files. We are looking for the specific file – wp-config.php. Its location entirely depends on where you have installed your WordPress script.

  • If you installed it on your main website (main directory), then follow this path:
    /home/account_username/public_html/wp-config.php
  • If you installed it in a subfolder (addon domain, subdomain, etc.), follow this path:
    /home/account_username/public_html/subfolder_name/wp-config.php

where:

  • account_username is your cPanel username
  • subfolder_name is the name of your specified subfolder.

For example, the next screenshot shows wp-config.php file location, if WordPress was installed in the main directory:

WP-config-location

For FileZilla

After successfully logging into your FTP account, you should be located in your host’s main directory, – either home or public_html. In either case, you will then need to navigate to your WordPress installation’s main folder, it could be either /home/public_html/ or /home/public_html/wp_folder (wp_folder is a name of a subfolder you were using for your WordPress installation).

For example, this screenshot shows the location of wp-config.php file when WordPress is installed in wp subfolder:

FTP Directory

Step 2 — Acquiring database name from wp-config.php file

In order to open and review your wp-config.php file, you will need to right-click on it and go to either edit or view. This action is almost the same for both – FTP and File Manager.

Once inside, navigate to the value called DB_NAME (you may use a ctr+f combination in order to find it faster). In this case, the database name is sirseeu_wp859.

Inside wp-config

Conclusion

In this tutorial, we have learned how to access hosting account’s directory in order to review wp-config.php file’s contents. You can very similarly check for other database details there as well by looking up DB_HOST, DB_USER, DB_PASSWORD values since they all represent your actual WordPress database details.

This is one of the initial steps towards the greater understanding of WordPress setup and configuration.

Join thousands of subscribers worldwide

and get awesome deals & the newest tutorials to your email

Please wait...

Thank you for sign up!

More in WordPress Tutorial
How to Change WordPress Language

Close