Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Where is the WordPress configuration file?

The configuration file is called wp-config.php. This guide shows where it is and how to open it safely.

WordPress2 min read10 steps

What is wp-config.php?

A configuration file holds the settings a program needs to start. The WordPress one tells your site how to reach its database. A database is the place where WordPress stores your posts and settings.

It also holds:

  • The database name, user name, password and host
  • Security keys, which are long random strings that protect logins
  • The table prefix
  • Debug and memory settings

Where is it?

It sits in the main WordPress folder, next to the folders wp-admin, wp-content and wp-includes. On many hosting plans the path looks like this:

/home/your-username/public_html/wp-config.php

If WordPress is in a sub-folder, the file is in that sub-folder. Sometimes WordPress allows the file to sit one folder above the site folder. This adds a bit of safety.

How to find it with File Manager

  1. Log in to the client area.
  2. Open your hosting service and go to your control panel.
  3. Open File Manager.
  4. Click the folder for your website, often public_html.
  5. Look for wp-config.php in the list.

If you do not see it, the site may live in a different folder. Check the folder of your domain. Or use the search box in File Manager.

How to edit it

Warning: A small mistake in this file can take your site down. Download a copy before you edit.
  1. Right-click wp-config.php and choose Download to keep a backup.
  2. Right-click it again and choose Edit.
  3. Make your change. Keep the quote marks and semicolons.
  4. Click Save Changes.
  5. Reload your site to test.

Add new lines above the comment that says "That's all, stop editing! Happy publishing." Lines placed below it may not work.

Keep it safe

  • Never share this file. It holds your database password.
  • Set its permissions to 600 or 640 if your host allows it. These numbers limit who can read the file.
  • Do not post its content in public forums. Hide the password first.
Tip: If you cannot find it, open a support ticket.

Quick recap

  • The file is wp-config.php, in your main WordPress folder.
  • It holds your database details and key settings.
  • Open it with File Manager.
  • Back it up before editing and keep it private.