How to find out the database details of your WordPress website in cPanel?

You can find out the database details of your WordPress website from the wp-config.php file which is present inside the file manager of WordPress. So let's find out how you can check that, in a stepwise manner.

1. First, log in to your cPanel account using your account credentials.

2. Then click on the File Manager option present under the Files section. 


3. Then a new window will open, next click on the public_html folder.


4. Inside this folder find a file named wp-config.php, then right-click on it and click on edit.


5. A popup menu will appear, then click on the Edit/View button.


6. A new tab will open in the browser with some code in it. It will look something like this:

/** MySQL database username */
define('DB_USER', 'Username');
/** MySQL database password */
define('DB_PASSWORD', 'password');
/** MySQL hostname */
define('DB_HOST', 'localhost');​

In this case, the database user name is 'Username', the database password is 'password' and the database hostname is 'localhost.'

It will be different for you. So this is how you can find out the database details of your WordPress website using cPanel.

Did you find this article useful?