wp-config.php Location

Published: 3 Mar 2023

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-admin]
[wp-content]
[wp-includes]
index.php
license.txt
readme.html
wp-activate.php
wp-blog-header.php
wp-comments-post.php
wp-config-sample.php
wp-config.php
wp-cron.php
wp-links-opml.php
wp-load.php
wp-login.php
wp-mail.php
wp-settings.php
wp-signup.php
wp-trackback.php
xmlrpc.php

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.

See how to create wp-config.php from wp-config-sample.php.

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:

What to do when wp-config.php is missing.

For more information on wp-config.php, its essential settings, security, and troubleshooting, see:

wp-config.php Setup Step-by-Step

By remaining on this website or using its content, you confirm that you have read and agree with the Terms of Use Agreement.

We are not liable for any damages resulting from using this website. Any information may be inaccurate or incomplete. See full Limitation of Liability.

Content may include affiliate links, which means we may earn commission if you buy on the linked website. See full Affiliate and Referral Disclosure.

We use cookies and similar technology to improve user experience and analyze traffic. See full Cookie Policy.

See also Privacy Policy on how we collect and handle user data.

© 2024 WPDir