How to find DB_NAME, USER and PASSWORD


I accidentally overwrite “wp-config” on my Wordpress installation with the “wp-config” of my local installation. I don’t have a backup of this “wp-config”… So my question is : how can I find the name of the database, the username and the password?

And what about the authentication Unique Keys and Salts?

Should I do a fresh installation of my wordpress?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


I would recommend logging into your MySQL instance and looking up for your database:


If you have a descriptive name it would be easier for you to find the database.

Once you have your database name, you could either try to do the same for your user, or create a new user instead:

Regards, Bobby