Finding out the databse details for WordPress based website

Most CMSs such as WordPress or Joomla store the database details in their default configuration files.

The WordPress configuration file is called wp-config.php and can be found in your website root folder. This is usually called public_html or httpdocs however, if your website is located in a subfolder (http://domain.tld/wordpress for example) then the root folder for the website will be /public_html/wordpress or /httpdocs/wordpress.

Wordpress files

Open the wp-config.php to check or alter the database connection details, they look like this:

define(‘DB_NAME’, ‘a_database_name’);

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

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

/** MySQL hostname */
define(‘DB_HOST’, ‘cust-mysql-123-07’);

Leave a comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.