Discovering WordPress database info

  • Answered
When I tried logging into my WPress site, WP displayed a message basically saying it would not let me go further until it had the following information to create a wp-config.php file. (I have no idea what prompted this message as I've had this site since 2007 or so.)

Here's the relevant text from their message:

"Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.

Database name
Database username
Database password
Database host
Table prefix (if you want to run more than one WordPress in a single database)

We’re going to use this information to create a wp-config.php file. If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php. ...

In all likelihood, these items were supplied to you by your Web Host. If you don’t have this information, then you will need to contact them before you can continue. If you’re all ready…"

I can guess that my username and password are what I currently use to log in. But database name? Database host? ("localhost" maybe?)

Is there a place in CPanel or app I could use to divine this information? I used the CPanel File Manager to see that no wp-config.php file exists. Any clues would be appreciated.

My site is

Thank you for your question on WordPress database information. This information is located within your cPanel under the database category. The username and password are specifically for the database. Host will be "localhost", as you guessed.

I would contact support, however, as that page only comes up if the wp-config file is missing. This can be indicative of a hack or corruption on the site. You may want to have support check and see if they have a backup of some sort to replace it, if needed. Or they can help you replace your own 'last good copy' as well.

Kindest Regards,
Scott M