WordPress glossary

wp-config.php

The file with your site’s database details and core settings.

wp-config.php is the configuration file of a WordPress site. It sits in the root folder of the install, and it’s where WordPress finds what it needs to connect to the database: its name, the username and password, and the server it runs on. It also holds a set of security keys WordPress uses to protect logins. The installer creates the file for you, from a template called wp-config-sample.php.

You can also use it to change how WordPress behaves, with constants: single lines of PHP that turn a setting on or off. WP_DEBUG shows errors while you develop, DISALLOW_FILE_EDIT removes the theme and plugin file editors from the admin, and DISABLE_WP_CRON stops WP-Cron from running on page loads. You can even turn off AI in WordPress with one. New lines go above the one that says “That’s all, stop editing!”.

Since the file holds your database password, never share it, and make a copy before you edit it: a typo can take the whole site down. WordPress updates leave it alone, so your changes stay in place. Some managed hosts don’t let you edit it, and handle these settings for you instead.

Published December 3, 2026

Related terms