What is: wp-config.php
wp-config.php is one of the core WordPress files. It contains information about the database, including the name, host (typically localhost), username, and password. This information allows WordPress to communicate with the database to store and retrieve data (e.g. Posts, Users, Settings, etc). The file is also used to define advanced options for WordPress.
The file wp-config.php does not come in the default download package of WordPress. Instead, it contains a file called
wp-config-sample.php which can be renamed and used as wp-config.php to install and use WordPress.
The following shows the most important section of the wp-config file:
The remaineder of the wp-config file, shown below, also has more advanced settings to configure other database elements, the security keys for your WordPress installation, and developer options. You can automatically generate a new set of security keys by visiting the WordPress API site.