wp-config.php Location

wp-config.php is located in the root directory of WordPress – the same directory where you can see the three subdirectories wp-admin, wp-content and wp-includes, as well as several (normally about 15-20) other files, such as index.php, wp-login.php or wp-settings.php.

If you don’t have anything else in that directory (other than the WordPress files), it should look like this:

wp-config.php location in WordPress

If you can’t find the wp-config.php file in this location and your website is new, it is because the wp-config.php file is not included in a new WordPress installation. Instead, you may be able to find a file named wp-config-sample.php, which you can use to create wp-config.php. Detailed step-by-step guide is available here:

How to Create a wp-config.php File

If you can’t find either wp-config.php and wp-config-sample.php, there are alternative ways to create wp-config.php (wp-config-sample.php is not needed for a WordPress website to work; its only purpose is to help create wp-config.php). You can find all the alternatives here:

wp-config.php Missing / Not Found

For more information on wp-config.php, see:

wp-config.php – All You Need to Know and More