New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Help Centre

BugShield Knowledge Base

Guides, walkthroughs, and answers for getting the most out of your account.

The WordPress Configuration File

wp-config.php is an important WordPress configuration file. It is normally stored in the WordPress root directory and contains the details WordPress needs to connect to its database, along with security keys and optional settings.

Information you may find

  • DB_NAME, DB_USER, DB_PASSWORD and DB_HOST connect WordPress to its database.
  • The table prefix identifies the database tables used by the installation.
  • Authentication keys and salts help protect signed-in sessions.
  • WP_DEBUG and related constants control WordPress debugging.
  • Optional constants can control URLs, memory, automatic updates and administrative file editing.

Before editing the file

  1. Confirm that you are working on the correct WordPress installation.
  2. Download a copy of the existing file and create a current site backup.
  3. Use a plain-text or code editor rather than a word processor.
  4. Change only the setting required by the instructions you are following.
  5. Save the file, then immediately test the website and WordPress admin.

Protect sensitive values

The file can contain database credentials and security material, so do not paste it into a public message or forum. Add hosting or file access to the BugShield Password Vault if a developer needs to inspect it.

Common questions

Frequently Asked Questions

Where is wp-config.php located?

It is normally in the root of the WordPress installation, alongside directories such as wp-admin and wp-content. Some configurations place it one directory above that root.

Can I download wp-config.php from WordPress admin?

WordPress does not provide it through the normal admin area. Access usually comes from the hosting file manager, SFTP or SSH.

Should WP_DEBUG stay enabled on a live website?

Detailed debugging is intended for controlled troubleshooting. Public error display should not remain enabled on a live site because messages can expose sensitive technical details.

What should I do if the site stops loading after an edit?

Restore the saved copy of wp-config.php, then review the edited line for a typing or syntax error before attempting the change again.

Still need help?

Can’t find what you need? Our team is here to help.

Contact us