WordPress uses a configuration file called wp-config.php to store database connection details. These include the database name, username, password, and host.
If you do not remember your database credentials, you can safely retrieve them from this file instead of changing them in the control panel.
Table of Contents
Important note
Do not change the database password directly in the mybox panel without updating the configuration file.
If the password becomes unsynchronized, the website will stop working.
Steps to find database credentials
1. Connect via FTP
Log in to your server using FTP (for example FileZilla).
2. Locate WordPress installation directory
Navigate to the folder where WordPress is installed.
By default, this is:
/public_html
or a domain-specific directory such as:
/domainname/public_html
3. Open wp-config.php
Find and open the file:
wp-config.php
This file contains the database connection settings used by WordPress.
4. Find database credentials
Inside the file, you will see configuration lines like:
define('DB_NAME', 'database_name');
define('DB_USER', 'database_user');
define('DB_PASSWORD', 'database_password');
define('DB_HOST', 'database_host'); These values represent:
- DB_NAME → database name
- DB_USER → database username
- DB_PASSWORD → database password
- DB_HOST → database server address
Practical implications
- These credentials are required for phpMyAdmin login
- Editing them without updating the database will break the website
- FTP access is required to view or edit the file
- This method is the safest way to recover database access details
Summary
Database credentials for WordPress can be retrieved directly from the wp-config.php file located in the WordPress installation directory. This ensures safe access without modifying database settings in the control panel.