How to find database information in a WordPress installation

If you have to access phpMyAdmin to manage the database for your WordPress installation, and you do not have the log in information, you do not have to give up. You can find the log in information in the WordPress installation almost every time if you have FTP access.

Use the wp-config.php file

You can use the wp-config.php file, which is located in the root of the WordPress installation.

  1. Open wp-config.php
  2. Search for MySQL settings
  3. If the information is defined, then you can find the host, name of the DB, username and password
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'SOMENAME');
    /** MySQL database username */
    define('DB_USER', 'SOMEUSERNAME');
    /** MySQL database password */
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
  4. Go to phpMyAdmin, and log ind with the information. If you do not know how to find phpMyAdmin, you can often find it on phpmyadmin.yourdomain.?? or yourdomain.??/phpmyadmin. If the host is not "localhost", but an domain or an IP, you can try to go to the host.'

Martin Schadegg Rasch Jensen