WordPress Tutorial

How to Find Out WordPress Database Name

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.

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:
  • If you installed it in a subfolder (addon domain, subdomain, etc.), follow this path:


  • 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:


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


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.

About the author

Elvinas S.

Elvinas is a senior server administrator at Hostinger. He monitors the infrastructure’s well-being and keeps the uptime at a maximum. Besides server management, web development has always been one of his biggest passions.

1 Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get Exclusive Content

Join thousands of webmasters who get our free newsletter with tips on how to drive more traffic and revenue to their websites!

Please wait...

Thank you for sign up!

More in WordPress Tutorial
How to Change WordPress Language