Reset generated wp-config.php with wp-cli

How can I solve this and besides, Can someone explain me where this temporary config file is located?

This will be generated in the WordPress root folder, the same from where you call the wp-cli.

Keep in mind you need to provide the correct username password and database name, else it will error.

If you error like:

$ wp core config –dbname=new_name –dbuser=bbb –dbpass=ccc –dbprefix=wp_ddd_
Error: The ‘wp-config.php’ file already exists.

Then simple move that file like:

mv wp-config.php wp-config2.php

Hope this helps.