How to Find a WordPress Database?

What do you do when you need to update database strings or a database user’s password for a WordPress database? You’re not sure which user belongs to what database because you have 15 domains, all with databases that are worded similarly. Below are some pretty simple steps on finding the information you seek:

Why would you need to get into your database?

There are several reasons you might need to get to your database. Here are a few:

  • To create a copy of the database
  • To import a copy of the database
  • If you need to change the them because of a blank screen
  • The admin password may need to be updated
  • Check the WordPress database version

How to find the database name and username?

In the WordPress installation, there will be a file called wp-config.php. In the webshell, select this file and chose edit to view the text. In this file you will find the database name, database user name, database user password, MySQL Hostname, database charset, and collate type. You can also choose to locate the wp-config file through an ftp client. Below is an example of what the file may look like:

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘C111111_mydb’);

/** MySQL database username */
define(‘DB_USER’, ‘C111111_mydbusr’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘M7Sup3r9W’);

/** MySQL hostname */
define(‘DB_HOST’, ‘’);

/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8′);

/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);

Was this article helpful?

Yes (0)
No (1)

We're sorry you didn't find this article very helpful. Please help us improve it by leaving your feedback below.